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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FieldName is reserved word 1

Status
Not open for further replies.

benlinkknilneb

Programmer
May 16, 2002
590
US
Hi all,

I'm trying to migrate some data into SQL Server. When I use the DTS Query Builder, the string won't parse because the source table has a field named "date", which is a reserved word. I'm not an administrator in the source DB, so I can't change the field name. Is there some way I can get it to accept the name on SQL Server's end, at least long enough to get the data into SQL table? From that point I'm doing some transforming, so it won't stay like that very long.

TIA
Ben
 
Try surrounding the word date with either brackets [] or double quotes.

 
Thanks... I moved up to another error (quotes worked).

Now it says

"Error at destination for row 206. Errors encountered so far in this task: 1. Insert Error, column 4 ('date', DBTYPE_DBTIMESTAMP), status 6: Data Overflow. Invalid character value for cast specification.

I know that this means the data in the date field for row 206 is invalid... but how do I fix it so my program will still accept it?

Ben
 
Dates are always a problem. What I usually do is create all my DTS imports to go to a staging table where the date fields are defined as varchars. I then massage the data as needed before moving it to its final location.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top