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

combine 2 table with logic inside

Status
Not open for further replies.

nattyborneo

Technical User
Feb 1, 2011
29
DE
Dear all Guru,

I have a problem to combine 2 table with the logic.
For ex :
table 1 contains code
AB
BA
ABB
ABA
table 2 contains code
AB
BA
ABC
ABN

I want to make logic using maybe shared variable or whatever it is, to get the code which are in table 1 but not in table 2.
so, the answer is : ABB and ABA
Any idea?
thankyou...
 
Hi,
Probably the easiest way ( if your database supports it) is to use a command instead of selecting from joined tables - one like:

Select code from table1
MINUS
Select code from table2


should return just those codes in 1 but not in 2.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Or,

Link Table 1 to Table 2 using a left outer join FROM table 1 TO table 2. Then use a record selection formula like this:

isnull({table2.code})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top