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 |
robcpettit
Starting Member
11 Posts |
Posted - 2013-10-09 : 12:31:09
|
Hi Im bulk inserting from a csv file usingBULK INSERT testTableFROM 'C:\Users\Robs\Documents\Soccer\2011-2012\SC1.csv'WITH( FIRSTROW=2, FIELDTERMINATOR = ',', ROWTERMINATOR = '\n', )Works fine. Most of my csv files have the same number of columns, but some have 4 less. The files contain the same column headings as the full size ones(only 4 less). Is there a way when bulk inserting for sql to either skip these, or ignore the error. Much AppreciatedRobert |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2013-10-09 : 12:50:24
|
I would create a testTable2 with this other layout.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2013-10-09 : 16:53:21
|
Any luck you can use SSIS? The flat file connector has Ragged right option. Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA |
 |
|
|
|
|