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 |
|
smithani
Starting Member
42 Posts |
Posted - 2007-09-06 : 16:39:13
|
| Hi,I am trying to translate this foxpro stuff into Tsql with no luck.Apparently there is no calculate function and arrays in tsqlI want to write this in TSQLcalculate max(times) to m.times for inlist(status,'K','T','M','N') and !expired.How do i loop thru and find max for each inlist member.Any help will be greatly appreciated.Thanks |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2007-09-06 : 16:57:35
|
| Will this do? I don't know foxpro, but this will give the max of the column "Times" from the table "yourtable"SELECT [status],max(times)from yourtablewhere [status] in ('K','T','M','N') group by [status]Jim |
 |
|
|
smithani
Starting Member
42 Posts |
Posted - 2007-09-07 : 00:00:54
|
| yes, thanks so much. |
 |
|
|
|
|
|