Microsoft
Software
Hardware
Network
Question : Finding the oldest date from a set of max dates
I have a lot of history that I need to group by product. I take the most recent update date for each product, then I need to get the Oldest of those most recent dates.
So I start by grouping by product ID to get the most recent update date.
select product_id, max(updateDate)
from productChanges
where company_id = 123
group by product_id
Now I need to get the Oldest from that set of data so that I have one date for company 123
I have tried this but it's giving an error...
select min(theDate)
from (
select max(updateDate) as theDate
from productChanges
where company_id = 123
group by product_id
)
What's the correct syntax to get the oldest date from a set of max() dates?
Thanks!!!
Answer : Finding the oldest date from a set of max dates
You can use below code for the same.
Me.ReportViewer1.SetDispla
yMode(Disp
layMode.Pr
intLayout)
Random Solutions
storing multiple image in one field
Limit Files on a Samba Share - Oppisite of veto files
Count consecutive values in MS SQL Server 2005
can't find Printer Setup Utility in Mac OS X 10.5.8
Does OpenOffice allow Windows 7 preview pane to preview .doc and .xls files?
code for menu
How can I find the position of the first occurance of a numeric charater in a string with PHP?
VMware Workstation 7.1 Won't Install
How to create own SMTP Server on VPS?
Why won't Exchange Transport service start in Exchange 2007 on our SBS 2008 server ?