Inmagic Forums
Inmagic Forums
ODBC
Howto convert column of datatype integer to text in select statement?|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
I'm trying to concatenate a hardcoded string and an integer column in a select statement.
SELECT 'Record number is: ' + Record_Number FROM Records WHERE (Record_Number = ?) However, I get an error "Invalid Operand for operator: +". I figure the solution is to convert the Record_Number column to a string but I can't figure out how. Is there a way to convert the integer column to a string so the contatenation will work? In SQL I can write a query like this which works. select 'record number is: ' + CONVERT(varchar(30),record_number) AS SomeText from records What is the equivalent to use with the ODBC driver? |
|||
|
I figured it out
select 'record number is: ' + {fn CONVERT(record_number, SQL_VARCHAR)} AS SomeText from records |
||||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Inmagic Forums
Inmagic Forums
ODBC
Howto convert column of datatype integer to text in select statement?
