Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Loading data from Management Studio

Author  Topic 

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-11-20 : 17:16:41
Hello All,
I have tab delimited text file consists of some description.
I am using bcp to load tab delimited text file to the temp table and do some DML oprerations inside the DB.(Updating the base table description).
Currently I am facing the issue,when I sent the scripts to production,they want only one .sql file instead of saving the tab-delimited text file and running the scripts.
Is there any way i can copy the contents in the file and paste it in .SQL Script and load using some scripts.
Currently I am parsing the file and using

insert into values(value1,value2 ,etc)

to load into the temp table.
Is there any other better way ,please let me know.
Any help would be really appreciated.









Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2006-11-20 : 19:00:12
This might help you out:

http://vyaskn.tripod.com/code.htm

search for "Procedure to script your data" on that page.

EDIT: however I would push back on production about the bcp thing. it's much more efficient if you have a lot of data. Do they have a good reason why don't they want to use bcp or BULK INSERT?



SqlSpec - a fast, cheap, and comprehensive data dictionary generator for
SQL Server 2000/2005 and Analysis Server 2005 - http://www.elsasoft.org
Go to Top of Page

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-11-21 : 01:45:23
Thanks jezemine!


Thanks!
Raju
http://www.trickylife-trickylife.blogspot.com/
Go to Top of Page
   

- Advertisement -