Hi - working in Access 2000... my goal is to combine fields from two tables in a query:
Table 1 has ItemNumber and ItemDescription . There's only one record per ItemNumber.
Table 2 has ItemAlias. It also has ItemNumber and LatestUsedDate.
Table 2 may not have any record for an ItemNumber in Table 1; it may have one record; or it may have several records for a given ItemNumber.
Sometimes the LatestUsedDate is filled in; sometimes it's not. Where there are more than one record with the same item number, the LatestUsedDate is always filled in for at least one of the records.
I need a query that will give me the ItemNumber and ItemDescription from Table 1 and the ItemAlias from Table 2. If there are more than one record for a given ItemNumber in Table 2, I need the ItemAlias for the record with the most recent LatestUsedDate.
So I create a query with just ItemNumber and MaxOfLatestUsed Date from Table 2.
The problem is getting the ItemAlias in there, because I can't "group by" the alias - it's different for each record when there are multiple records with one item number, so I'm back at square one with multiple records for one ItemNumber.
I tried creating a new query using the first query (ItemNumber and MaxOfLatestUsed Date), linked to Table 2 on ItemNumber and pulling the two fields from the query plus the ItemAlias field from the table; didn't work.
Any ideas?
Thanks,
Angi
Table 1 has ItemNumber and ItemDescription . There's only one record per ItemNumber.
Table 2 has ItemAlias. It also has ItemNumber and LatestUsedDate.
Table 2 may not have any record for an ItemNumber in Table 1; it may have one record; or it may have several records for a given ItemNumber.
Sometimes the LatestUsedDate is filled in; sometimes it's not. Where there are more than one record with the same item number, the LatestUsedDate is always filled in for at least one of the records.
I need a query that will give me the ItemNumber and ItemDescription from Table 1 and the ItemAlias from Table 2. If there are more than one record for a given ItemNumber in Table 2, I need the ItemAlias for the record with the most recent LatestUsedDate.
So I create a query with just ItemNumber and MaxOfLatestUsed Date from Table 2.
The problem is getting the ItemAlias in there, because I can't "group by" the alias - it's different for each record when there are multiple records with one item number, so I'm back at square one with multiple records for one ItemNumber.
I tried creating a new query using the first query (ItemNumber and MaxOfLatestUsed Date), linked to Table 2 on ItemNumber and pulling the two fields from the query plus the ItemAlias field from the table; didn't work.
Any ideas?
Thanks,
Angi
Comment