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-08 : 17:07:07
|
| Newbie trying learn today:I am trying to import a txt file in a tableFile is C:\car\use.txtdatabase name is: CarTesttable name is: CarINVI want to import exactly what is in teh use.txt file and i am getting errors. I have have used (2) code:1.) Insert into CarINV Select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\car\4-8-2010.xls;HDR=YES', 'SELECT * FROM [Deal$]')1-error.) Msg 8114, Level 16, State 5, Line 1Error converting data type nvarchar to float.-------------------------------------------------------2.) BULK INSERT CarINV FROM 'c:\car\use.txt' WITH ( FIRSTROW = 2, MAXERRORS = 0, FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' )2-error.)Msg 4864, Level 16, State 1, Line 1Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 1 (DEALER_ID).Msg 7399, Level 16, State 1, Line 1The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.Msg 7330, Level 16, State 2, Line 1Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".Patrick |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-09 : 02:21:13
|
| What is the datatype of DEALER_ID column?MadhivananFailing to plan is Planning to fail |
 |
|
|
pjnovak007
Starting Member
19 Posts |
Posted - 2010-04-09 : 08:34:46
|
| it's just a 3 digit number so could i have that setup incorrectly?Patrick |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-09 : 08:49:46
|
quote: Originally posted by pjnovak007 it's just a 3 digit number so could i have that setup incorrectly?Patrick
Are the data available in the text file of the same type for that column?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|