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.
| Author |
Topic |
|
NewSQLMember
Starting Member
15 Posts |
Posted - 2009-06-27 : 02:17:32
|
| Hi,Anyone can help me, on how to insert a RAW Data to a Table with selected columns. I need only the Column1 and Column3 to be inserted. Thanking you.TextFile : RawData.CSV----------------------Column1,Column2,Column31111111,AAAAAA,BBBBBBB2222222,AAAAAA,BBBBBBB3333333,XXXXXX,CCCCCCTable : RAWDATA-----------------Column1 int,Column2 varchar(10),Column3 varchar(10),Regards,NewSQLMember |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-06-27 : 03:08:28
|
You can use a format file with either BULK INSERT or BCP.There are examples of this in Books Online. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-27 : 03:26:11
|
| http://www.nigelrivett.net/SQLTsql/BCP_quoted_CSV_Format_file.html |
 |
|
|
NewSQLMember
Starting Member
15 Posts |
Posted - 2009-06-27 : 03:50:55
|
| visakh16, Thank you very much, not it works.Regards,NewSQLMember |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-28 : 00:52:03
|
| welcome |
 |
|
|
|
|
|
|
|