SQL Query (joins and subselects) help needed

P

Peter Gruendler

I have the following selection which uses the three tables
ldKategorie1
ldKategorie2
ldZitKat

sql2 = "select k2.kat2Name, k1.kat1Name
from ldKategorie2 k2, ldKategorie1 k1
where k1.kat1Key=k2.kat2Kat1 and kat2Key in
(select zkKat2 from ldZitKat
where zkZit=" & Session("CurrentZitKey") & ")"

which works fine.

Now I would need an additional field in the return recordset, namely
ldZitkat.zkKey. The records in the selection should be those returned by
the above statement

The database layout is shown in
http://peter.gruendler.org/images/relationen.gif

I somehow can't get this working.
Some help would be appreciated!
thx,
Peter
 
Top