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 |
|
Ex
Posting Yak Master
166 Posts |
Posted - 2005-01-18 : 22:37:49
|
| hey all,just wondering if i had a intDECLARE @a intSET @a = 56is there anyway to break it up into its units?i.e i want to find out the 2nd number |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-01-18 : 23:32:01
|
| DECLARE @a intSET @a = 56SELECT @aSELECT SUBSTRING(CAST(@a AS VARCHAR(55)),2,1)MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-01-19 : 00:11:46
|
| orDECLARE @a intSET @a = 56SELECT @aSELECT SUBSTRING(ltrim(str(@a)),2,1) |
 |
|
|
vganesh76
Yak Posting Veteran
64 Posts |
Posted - 2005-01-19 : 05:35:17
|
| DECLARE @a intSET @a = 56SELECT right(@a,1)Enjoy working |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-01-19 : 07:22:20
|
| select a%10Jay White{0} |
 |
|
|
|
|
|