i have a text file with merely 25 fields delimited with pipe symbol. now i have created a console application to import this text file data to the database table. in my database table, i have only 10 columns and user will choose the 10 columns from the 25 columns.
so i have to import that particular 10 fields chosen by the user into the database. i am using the bulk insert query to import the text file into the temp table in my console application.
Now, how to import the user chosen 10 columns alone from the text file to database table.
how to modify the bulk insert query to achieve this? please help me to do this.
abivenkat
Member
50 Points
97 Posts
Bulk Insert Querying to import data from text file to a database table
Jun 19, 2012 03:04 PM|LINK
hi all,
i have a text file with merely 25 fields delimited with pipe symbol. now i have created a console application to import this text file data to the database table. in my database table, i have only 10 columns and user will choose the 10 columns from the 25 columns. so i have to import that particular 10 fields chosen by the user into the database. i am using the bulk insert query to import the text file into the temp table in my console application.
Now, how to import the user chosen 10 columns alone from the text file to database table.
how to modify the bulk insert query to achieve this? please help me to do this.
thanks,
venkat
rickevry
Member
386 Points
88 Posts
Re: Bulk Insert Querying to import data from text file to a database table
Jul 02, 2012 10:53 AM|LINK
This question is too generic. Can you please post some code/sql?