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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Query

Status
Not open for further replies.

Max1mum2

Programmer
Jan 30, 2003
13
US
I need some help. Our Database is not normalized at all and We keep track of SN returns with Tables for the Return #. Like 1st TR,2nd TR,3rd TR.. I need a query to pull all information from 1st,2nd,3rd TR tables if it is a 3rd TR and then sort the data like this:
Return # Serial Number
1st TR 12345 <--- All Information from the 1st TR for SN
2nd TR 12345 <--- All Information from the 2nd TR for SN
3rd TR 12345 <--- All Information from the 3rd TR for SN

and i need to pull information between 2 dates. So If its a 3rd TR between 1/1/2001 and 3/16/2003 i need to pull all information for that Serial Number from all the tables.

I have been writing a module to generate a Union Query but its becoming more hassle then i think its worth.

THANKS IN ADVANCE!

- maximum
 
I got my form working to generate 2 Union Queries. One for Product A and one for product B. but there has got to be a easier way to say &quot; IF A Third TR record Exists Between #1/1/2003# and #3/1/2003# then Pull Data from 1st TR,2nd TR,3rd TR Tables


- Maximum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top