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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 First time poster with a question

Author  Topic 

mj
Starting Member

25 Posts

Posted - 2001-08-17 : 14:12:13
this is my first of what will probably be many posts on this board. I have a question to ask, which if is inappropriate for this particular group, please advise me of the correct group to post it in and I will do so, thank you.

Anyway, my problem/question is...
I have a tab delimited text file that contains data, three of the columns contain only integer numbers, however, when I try to import this file into my table that I have created, I get the error:

'tblBORPassword (lswebsite)' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value '6488 ' to a column of data type int.

I see what the problem is, is that there is a trailing space on the end of the value. I tried doing a update table set fieldname = ltrim(fieldname) and rtrim(fieldname). The sql query analyzer told me that all rows were affected, yet it still did not allow me to change the datatype. Any help/direction you are able to offer would be greatly appreciate it.

Thanks,
mj

   

- Advertisement -