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 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-12-20 : 06:45:27
|
| hi, how can I convert my bloody months into 01, 02,03 etc, instead of 1, 2 ,3 ?I am having a nightmare when trying to sort..thank youjamie |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-20 : 06:47:18
|
UPDATE Table1SET Col1 = LEFT(Col1, 4) + RIGHT('00' + SUBSTRING(Col1, 5, 8000), 2) E 12°55'05.25"N 56°04'39.16" |
 |
|
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-12-20 : 06:57:36
|
| cheers peso. that was doing my head in ! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-12-20 : 09:29:23
|
| why are you concatenating year and month?MadhivananFailing to plan is Planning to fail |
 |
|
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-12-20 : 12:26:05
|
| hi, so I can sort records into months and years... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-12-20 : 22:01:31
|
It seems that you have year and month in separate column. Why not use a single datatime column for this ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|