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 |
|
pjnovak007
Starting Member
19 Posts |
Posted - 2010-04-15 : 14:49:08
|
| I am trying to do a bulk insert and the first field in the table I want to insert a static message. Can one of you masters help me:BULK INSERT maindatetest FROM 'c:\car\VINVENTORY_20100413094221.txt'; WITH ( FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n' )Field name in the table is (IMPORT_DATE)value to insert is ('4/13/2010')Patrick |
|
|
pjnovak007
Starting Member
19 Posts |
Posted - 2010-04-15 : 17:04:07
|
| No one had an idea? :-)Patrick |
 |
|
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2010-04-15 : 17:08:28
|
i don't think bulk insert does this. why don't you make a default value for IMPORT_DATE?quote: Originally posted by pjnovak007 I am trying to do a bulk insert and the first field in the table I want to insert a static message. Can one of you masters help me:BULK INSERT maindatetest FROM 'c:\car\VINVENTORY_20100413094221.txt'; WITH ( FIELDTERMINATOR = '\t', ROWTERMINATOR = '\n' )Field name in the table is (IMPORT_DATE)value to insert is ('4/13/2010')Patrick
|
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
domano
Starting Member
1 Post |
Posted - 2010-10-14 : 22:28:23
|
| I am trying to do a bulk insert from a text file that looks as follows:1,03312010,2,"1","MORRIS SHEPPARD TEXARKANA","TEXARKANA","TX",48,"75501",37,1,8360,"","419 W 4TH ST","4 ","J",7,1934,"06 ",0,1/1/1934 0:00:00,2,0Is it possible to import without quotes when not all fields have quotes? I've been using Datawatch's Monarch software in a batch file to 'clean-up' the quotes, but would rather do it all within a SQL script.David Shepard |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|
|
|