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 |
|
scabral7
Yak Posting Veteran
57 Posts |
Posted - 2011-03-02 : 14:57:21
|
| Hi,i have a table that stores month and year in 2 seperate fields as a number, ie month = 12year = 2010month = 01year = 2011i need to be able to get the max month and year, but if i just say select max(month) i get 12 instead of 01 (01 is greater in this instance becasue of the year portion. Any way to do this using t-sql?thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
scabral7
Yak Posting Veteran
57 Posts |
Posted - 2011-03-02 : 15:14:27
|
| cool,didn't think about doing that way....thanks! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|