Join problem !

make

Member
I have two tables : m2t2f2am and xartikel

In the m2t2f2am i have a field with maybe 100 Entrys, 2 Fields.

Kombi_kz Liefertext
---------- ----------
100 "xxxxxxxx"
101 " xxxxxxxx"
105 "xxxxxxxx"
...

In the second table(more than 10000 Entrys) , then xartikel i have the follwoing fields :

Glas Gelöscht( data type Logical)
--------- ----------
100 Yes
102 No
104 No
.....

You can see the reference is the kombi_kz in m2t2f2am and the field glas in xartikel.
I need the following result:
Each Kombi_kz from m2t2f2am where Gelöscht from xartikel is No.

I have build the following query :

FOR EACH m2t2f2aM NO-LOCK,
EACH xartikel WHERE m2t2f2aM.kombi_kz = xartikel.glas NO-LOCK:
but the result list contains all entrys (more than 10000).
What can i do.

FOR EACH m2t2f2aM NO-LOCK,
EACH xartikel WHERE m2t2f2aM.kombi_kz = xartikel.glas NO-LOCK
and m2t2f2am.geloescht= false :

??????????????????? Please help me????????????????????


Greetings
Make
 

KubiaK

Member
Try this :

FOR EACH xartikel WHERE NOT xartikel.Gelöscht AND CAN-FIND (m2t2f2am WHERE m2t2f2am.kombi_kz = xartikel.glas) NO-LOCK :

DISP xartikel.

END.

Be also care your Gelöscht field is part of your xartikel table and not m2t2f2am in your description.
 
Top