SwampBoogie
It appears you nailed it.
Frederico,
Yours worked, but the exception you mentioned was an issue. It did have almost two records for each part.
My thanks to both of you. I learned a lot and the solution will be implemented today and be very helpful.
Ron
Frederico,
I thought you had it. I understand exactly what you did and made perfect sense. I didn't realize a FROM could contain a SELECT...thanks.
But it returns an error
"No column was specified for column 2 of 'b'"
I guess I could try putting "b" into a temporary...
Thanks, SwampBoogie, but that only returns a few values for the entire table as "select MAX(date) from transactions" only returns one value. Here is what I tried:
select part, serialnumber, shelflife from transactions
where date = (select max(date) from transactions)
and shelflife...
Sorry, I guess the desired results were not obvious. I need a report that returns the shelflife (actually the date when the shelflife expires) of the various parts in inventory (Note: Not all parts have a shelflife). For the sample data, if the report was run on 2002-12-25 with only the first 3...
Hi Frederico,
Here is what I thought would work, but it returns a shelflife when the part has been removed from the shelf (TYPE = ISSUE OR SHIPPED).
select part, date, type, serialnumber, max(shelflife)
from transactions
group by part, date, type, serialnumber
Your comment that this may be...
I have aircraft parts inventory program that uses a SQL7.0 DB. One table is Transactions which contains part numbers, date, type, serial numbers, and shelflife date among others. Typical types are RECEIVE, REMOVE, and ISSUE. The shelflife date is important when the part is on the shelf, but once...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.