Hi all,
I'm trying to
Select Top 1 value1 from table1
where CompID = 10
Order by mydate Desc
What this does is gives me the value of value1 for the max date.
Which works very well.
What I want to achieve is that get the max records for different compids = 7 or 9 or 10 etc. in the table.
Any ideas?
Thanks.
I'm trying to
Select Top 1 value1 from table1
where CompID = 10
Order by mydate Desc
What this does is gives me the value of value1 for the max date.
Which works very well.
What I want to achieve is that get the max records for different compids = 7 or 9 or 10 etc. in the table.
Any ideas?
Thanks.
Comment