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

4 tables 1

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
0
0
US
I have 4 tables that are connected by a Customer # field. I only want to show records when the Customer # shows on 2 or more tables in the last 30 days. Can anyone help me get started with this? Thank you for any help or suggestions.
 
Not sure how to do this. I would think that there would be a "master" table that you would left join to. If so, you might be able to do a isnull check and a count. But I am not sure that will work properly.
 
Formula 1:
if isnull({table1.date} then 0
else
if {table1.date} > currentdate-30 then 1 else 0

Formula2:
if isnull({table2.date} then 0
else

if {table2.date} > currentdate-30 then 1 else 0

Same pattern for Formula 3 and Formula 4.

Formula 5: {@Formula 1} + {@Formula 2} + {@Formula 3} + {Formula 4}

Then you can select or suppress on {@Formula 5} >1
 
Thank you Charliy! That did the trick!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top