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
 Import/Export (DTS) and Replication (2000)
 Reading and parsing data from a text file and inserting the data into a table in SQL SERVER 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-10 : 00:43:45
SRINI writes "Respected Sir/Madam
I am working on a project in my company.....The database used is SQL Server 2000. I created some tables....... The input data for these tables are in some text files....... I want to parse the file and read the file and insert the data into the tables in SQL Server 2000......BCP is for transfering the data in bulk to the database. I dont want all the data to be transferred.....I want to parse the file(i.e include only some columns) in the file to be inserted into the database.
Thanking you.
Srini"

dataphile
Yak Posting Veteran

71 Posts

Posted - 2002-06-10 : 04:07:18
Use data transformation services (DTS)
And then either insert the data into a staging table, clean it up, and insert it into the final destination.

or
write the SQL statement inside the "Transform Data Task" that results in the data you are looking for.

or
Use the 'lookup' tab in the transform data task.

Go to Top of Page
   

- Advertisement -