HI,
I HAVE AN EXCEL SHEET WITH SOME DATA, I WANT TO IMPORT THAT DATA (CELL
BY CELL WITH MANIPULATION) INTO THE SQL SERVER TABLES BY USING STORED
PROCEDURE(IF POSSIBLE).
IF ANYBODY HAVE DONE SIMILER TYPE OF JOB OR KNOWING ABOUT IT, PLS. LET
ME KNOW.
THANKS IN ADV.
T.S.NEGIWrap sql server with an object tag and create an instance for every
spreadsheet you have. Seriously, save your spreadsheet as a CSV and
use Bulk Insert. It's straight forward and can be found on the sql
Books On Line Help. -- Louis|||louisducnguyen@.hotmail.com (louis nguyen) wrote in message news:<b0e9d53.0311140737.280f0fda@.posting.google.com>...
> Wrap sql server with an object tag and create an instance for every
> spreadsheet you have. Seriously, save your spreadsheet as a CSV and
> use Bulk Insert. It's straight forward and can be found on the sql
> Books On Line Help. -- Louis
Louis thanks for your reply.
But this does not seems to solve my problem.
Bulk insert will not be right in this situation, coz. I have to
manipulate data also.
for example. if some record (id) already exist in data, in that case
only updation may require.
If I could read cell by cell data from excel sheet, then only this
level of manipulation is possible.
T.S.Negi|||tilak.negi@.mind-infotech.com (T.S.Negi) wrote in message news:<a1930058.0311240332.35ae29ef@.posting.google.com>...
> louisducnguyen@.hotmail.com (louis nguyen) wrote in message news:<b0e9d53.0311140737.280f0fda@.posting.google.com>...
> > Wrap sql server with an object tag and create an instance for every
> > spreadsheet you have. Seriously, save your spreadsheet as a CSV and
> > use Bulk Insert. It's straight forward and can be found on the sql
> > Books On Line Help. -- Louis
>
> Louis thanks for your reply.
> But this does not seems to solve my problem.
> Bulk insert will not be right in this situation, coz. I have to
> manipulate data also.
> for example. if some record (id) already exist in data, in that case
> only updation may require.
>
> If I could read cell by cell data from excel sheet, then only this
> level of manipulation is possible.
>
>
> T.S.Negi
Probably the easiest approach is to BULK INSERT or DTS the spreadsheet
into a staging table, then do an INSERT into the target table. That
way you can check and clean up the data while it's in the staging
table, and before it goes to the 'real' table.
Simon|||> If I could read cell by cell data from excel sheet, then only this
> level of manipulation is possible.
If you're more comfortable doing arrays/loops, I don't think T-SQL has
it. I would suggest bulk inserting into a temp table. Update
(manipulate it). Identify new records and insert. Identify existing
records and update.