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 |
hanaveenkumar
Starting Member
2 Posts |
Posted - 2010-03-01 : 03:30:23
|
hi,I want to get max value from a column, and compare that value with a variable say 'tempID' , if both are equal increment 'tempID' by 1..can any body suggest Thanksnaveen |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-03-01 : 03:42:34
|
if((select max(column_name) from table_name)=@tempid)set @tempid=@tempid+1else.....Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|