View Single Post
  #1 (permalink)  
Old 2006-06-16, 10:07 AM
Deus_m1k3 Deus_m1k3 is offline
Junior Member
 
Join Date: Nov 2004
Posts: 13
Deus_m1k3
Exclamation select rows from 3 tables

Hi:

I need to select the rows that aren't in a specific table but with a reference to a another table the tables are:

TABLE1
clv PK
names

TABLE2
clvp PK
clv FK (from TABLE1)

TABLE3
clva PK
clvp FK (from TABLE2)
dat

I know 4 sure the dat field on TABLE3 so I need 2 select the "names" fields that aren't related with TABLE2... e.g.

TABLE1
clv names
1 X
2 XX
3 XXX

TABLE2
clvp clv
1 2
2 1
3 2
4 2
5 1

TABLE3
clva clvp dat
1 1 AT-001
2 3 AT-002
3 4 AT-001
4 2 AT-003
5 5 AT-001

I need that the query result shows:

IF dat="AT-001" THEN

names
XXX


READ YA
Deus_m1k3
Reply With Quote
Sponsored Links