Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RonVolkmar

    Selecting Records based on values in other records

    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
  2. RonVolkmar

    Selecting Records based on values in other records

    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...
  3. RonVolkmar

    Selecting Records based on values in other records

    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...
  4. RonVolkmar

    Selecting Records based on values in other records

    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...
  5. RonVolkmar

    Selecting Records based on values in other records

    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...
  6. RonVolkmar

    Selecting Records based on values in other records

    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...

Part and Inventory Search

Back
Top