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
 Transact-SQL (2000)
 string concatenation

Author  Topic 

olepadre
Starting Member

9 Posts

Posted - 2008-12-09 : 11:07:04
PLEASE HELP. I keep getting "invalid operator for data type error"
Number is varchar(12)
Title is text


SELECT (CONVERT(text, Number) + '-' + Title) as vw2
FROM Table1


Not using convert shows the same result?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-09 : 11:11:15
[code]SELECT (CONVERT(varchar(8000), Number) + '-' + Title) as vw2
FROM Table1[/code]

b/w whats the datatype of Title?
Go to Top of Page

olepadre
Starting Member

9 Posts

Posted - 2008-12-09 : 11:13:11
the datatype for Title is 'Text'
Go to Top of Page

olepadre
Starting Member

9 Posts

Posted - 2008-12-09 : 11:23:27
Thanks, converting both to the same type worked!

Padre--
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-09 : 11:42:15
http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=39013
Go to Top of Page
   

- Advertisement -