Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract data

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
Hi

I have a flat file with 3 fields (varchar), seperate by a blank and 500 lines/rows and I want to insert them into a table desired (3 cols(varchar)) too.

I want a command or a script to use the flat file as an input and pick up the data of each field and insert it into the proper column (in order). Does anyone has any code like that?

Sorry to ask for this kind of work, but I am not a SQL programmer, I can not think of any !!

Thanks
 
Use the bcp utility:
bcp tableowner..tablename in yourflatfile -t' '
The blank separator is not the best - 'cos any blanks
in the text could be misinterpreted.
HTH ;-)
Dickie Bird
db@dickiebird.freeserve.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top