Last post Jul 01, 2009 03:23 PM by Naom
Jun 26, 2009 02:01 PM|mrgasp07|LINK
SELECT DISTINCT [Your Results].sonumber, [Your Results].company, [Your Results].custnumber, [Your Results].sodate, jobdata.dept, jobdata.status, jobdata.ID, jobdata.notes, jobdata.sonumber AS Expr1, [SO total query].SumOfextprice, [Your Results].reqdate
FROM (([Your Results] INNER JOIN jobdata ON [Your Results].sonumber = jobdata.sonumber) INNER JOIN [SO total query] ON jobdata.sonumber = [SO total query].sonumber)
The above statement works fine. I would like to add a parameter to only selects the next req date and not show all the req dates in the gridview for the particular sonumber. Only display one reqdate which should be the soonest date.
Thanks in advance
Jun 26, 2009 04:56 PM|Naom|LINK
Can you list your tables structures? Do you want to get the latest date per SoNumber? Without knowing the details of your problem I can only suggest to review
http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/the-ten-most-asked-sql-server-questions--1#5 for ideas of how to get the info.
This is in SQL Server, but in Access the approach of using derived table is the same.
Jul 01, 2009 12:53 PM|mrgasp07|LINK
SELECT DISTINCT sonumber, reqdate
FROM [Your Results]
I would like it only display the next req date for the sonumber. (Top 1, ASC ????)
Jul 01, 2009 03:23 PM|Naom|LINK
select SoNumber, min(RegDate) as RegDate from myTable group by SoNumber