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 |
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-12-08 : 08:22:10
|
| Hi,i want to select 2 integer and a varchar fields as one. How can i do it?Any ideas?thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-08 : 08:24:10
|
| [code]Select (Cast(IntCol1 as varchar) + ',' + Cast(IntCol2 as varchar) + ',' + VCharCol) as SomeColFrom Tbl[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-12-08 : 08:51:02
|
| SQL0402N The data type of an operand of an arithmetic function or operation "+ " is not numeric. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-08 : 08:51:07
|
| Select cast(int_column as varchar(10))+','+varchar_column from tableMadhivananFailing to plan is Planning to fail |
 |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-12-08 : 08:54:14
|
| SQL0461N A value with data type "SYSIBM.INTEGER" cannot be CAST to type "SYSIBM.VARCHAR ". |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-08 : 09:04:13
|
| Are you using SQL Server?MadhivananFailing to plan is Planning to fail |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2006-12-08 : 09:05:35
|
This is a forum on MS SQL Server. You can try http://www.dbforums.com for questions on other RDBMS. http://www.elsasoft.org |
 |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-12-08 : 09:09:51
|
| sorry for inconvenience |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|