Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Transformation problem....

Status
Not open for further replies.

Sheffield

Programmer
Joined
Jun 1, 2001
Messages
180
Location
US
Greetings,

I'm attempting to import a comma-delimited text file into SQL Server 7.0. The destination table has, as its first column, an auto-incremented (identity seed), Primary Key. This column isn't reflected in the *.txt file.

Knowing this, I transform the column mappings so they correspond as follows:
Code:
DB Columns  Data Type     *.txt file
----------  ---------     ----------
ID          int            <ignore>
tvDataID    int            001
AirDate     smalldatetime  002
AirTime     smalldatetime  003
Station     nvarchar       004
TimeZone    nvarchar       005
Affiliate   nvarchar       006
City        nvarchar       007
State       nvarchar       008
Program     nvarchar       009
<Empty>     nvarchar       <ignore>
<Empty>     nvarchar       <ignore>
dmaName     nvarchar       012
dmaID       int            013

However, the error message I receive is as follows:
error at Destination for Row number 1. Errors encountered so far in this task: 1. Invalid character value for cast specification.


Is this referring to the fact that I have ignored the first column, my auto-increment??

Does anyone know a workaround?

Many thanks in advance:-)
 
Sounds more like there is data in your first row which SQL Server can't convert into one of it's data types.

Are you date fields valid in yout txt file.

Rick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top