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 2005 Forums
 Transact-SQL (2005)
 convert + string

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-07-10 : 02:06:48
i have column of type int i want to convert and add a string LIKE:

ColumnA(int)
1
2
3

SELECT Convert(Varchar(50),ColumnA) +'EXX'
FROM TABLEA

i get this error:

Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value '1EXX' to data type int.

waterduck
Aged Yak Warrior

982 Posts

Posted - 2009-07-10 : 02:21:11
>"< why when i test no error come out...


Hope can help...but advise to wait pros with confirmation...
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-10 : 02:24:12
The error probably comes from somewhere else. Please post the full query


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-07-10 : 08:35:54
sorry my mistake, it is more complica but i figure out
Go to Top of Page
   

- Advertisement -