Query problem

Quim

New Member
Hi,

I have a table of head-boards of documents and other one of lines of these documents that contain articles. On the other hand I have the table of articles that have the value of the brand(mark).
Since I can know those documents that have a brand(mark) in concretly?

Example that duplicates head-boards of documents:

FOR EACH document NO-LOCK,
EACH lines OF document NO-LOCK,
FIRST items WHERE items.item-num EQ lines.item-num AND
items.mark EQ 'ADIDAS' NO-LOCK:
DISPLAY document.
END.

Another example that does not go out at all if the brand(mark) that looks for this one in the second line:

FOR EACH document NO-LOCK,
FIRST lines OF document NO-LOCK,
FIRST items WHERE items.item-num EQ lines.item-num AND
items.mark EQ 'ADIDAS' NO-LOCK:
DISPLAY document.
END.


Since I can obtain a good result?

Thank you for his(her,your) collaboration

Excuse if the explanation is not very clear, I have used a translator

Regards,

Quim
 
Hi.

Try using FIRST-OF to display only the first occurance of the head-boards

Example.

FOR EACH document NO-LOCK,
EACH lines OF document NO-LOCK,
FIRST items WHERE items.item-num EQ lines.item-num AND
items.mark EQ 'ADIDAS' NO-LOCK
break by <any field in document table>
by <any field in lines table>:
if first (<any field in document table> ) then
DISPLAY document.
END.

Also seeing your are in Barcelona, why dont post your question
in this spanish progress forum

http://www.proforo.net/proforo/index.php
 
Back
Top