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 |
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2008-04-30 : 10:55:12
|
hi i would like to append an apostrophe in front of a number while selecting it . How can i do it in the select statement.Like if i say select custnumber from customer it give result set as2345652345but i want the result to show as '2345'5345'2312Thanks in advance |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-30 : 10:59:19
|
SELECT CHAR(39) + CAST(CustNumber, 4)FROM Customer E 12°55'05.25"N 56°04'39.16" |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-30 : 11:01:04
|
SELECT '''' + CAST(LEFT(YourNumberField,4) AS varchar(4)) FROM YourTable |
 |
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2008-04-30 : 15:23:46
|
thank you all |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|