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.
| Author |
Topic |
|
reddymade
Posting Yak Master
165 Posts |
Posted - 2005-11-14 : 11:14:22
|
| I am trying to concatenate two columns first one varchar and second one real(4) datatype. I am getting an error with real conversion.SELECT TRIM(CNTitle) + ' ' + SequenceNO AS description FROM TableordersThank you very much for the information. |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-11-14 : 11:21:57
|
| 'TRIM' is not a valid SQL Server function.CODO ERGO SUM |
 |
|
|
reddymade
Posting Yak Master
165 Posts |
Posted - 2005-11-14 : 11:32:43
|
Sorry that was a typing mistake, i am using rtrim. But the problem is with the real datatype conversion.Can you please tell me how to concatenate a real datatype with varchar column and show as one putput column.Thank you.quote: Originally posted by Michael Valentine Jones 'TRIM' is not a valid SQL Server function.CODO ERGO SUM
|
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-11-14 : 14:54:14
|
| What is the error message you are getting?CODO ERGO SUM |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-11-14 : 14:59:56
|
try converting it to varchar:SELECT TRIM(CNTitle) + ' ' + convert(varchar(30), SequenceNO ) AS description FROM TableordersGo with the flow & have fun! Else fight the flow |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-11-14 : 15:06:02
|
quote: Originally posted by spirit1 try converting it to varchar:SELECT TRIM(CNTitle) + ' ' + convert(varchar(30), SequenceNO ) AS description FROM TableordersGo with the flow & have fun! Else fight the flow 
Ummmmm..that would beSELECT RTRIM(CNTitle) + ' ' + CONVERT(varchar(30), SequenceNO ) AS [description] FROM Tableorders But why use RTRIM? is CNTitle char(xx)?Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
|
|
|