Hi
I have 2 tables, say A and B. One field in table A, say A_link, points to a field B_link in table B. I need to select entries in A, which fulfill two conditions: A_cond1 = XX and B_cond2 = YY.

E.g
tabel A                         table B

A_cond1 A_link                  B_link  B_cond2
1       aa                      aa      A
1       aa                      ac      B
1       ac                      dd      A
2       dd                      ef      C
2       ef                      
3       aa
3       dd
3       dd
4       ac
4       ac
4       ef

How can I now define a select statement such as:

SELECT* from A WHERE A_cond1 BETWEEN 1 AND 3 "and corresponding field B_cond2 = A"

this would return

A_cond1 A_link
1       aa
1       aa
2       dd
3       dd
3       dd

many thanks for your kind help

best regards
Christoph

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to