Subject left outer join in interbase
Author Herman Santoso
Hi,

I want to make a query so it will return result something like this :

TABLE : PRODUCT(ID, CODE, NAME)
TABLE : PODETAIL (PO_ID, PRODUCT_ID, QTY)

PRODUCT :
P1 - PDT1 - Product1
P2 - PDT2 - Product2
P3 - PDT3 - Product3
P4 - PDT4 - Product4
P5 - PDT5 - Product5

PODETAIL
1 - P1 - 10
1 - P2 - 20
2 - P1 - 30
2 - P5 - 40
3 - P2 - 10
3 - P4 - 20

I want to make output that will return the PO_ID, PRODUCT_ID, PRODUCT_NAME,
QTY
of PODETAIL with ID = 1.
but it should return all products .., so it will be like this :

1 - P1 - Product1 - 10
1 - P2 - Product2 - 20
1 - P3 - Product3 - <null>
1 - P4 - Prodcut4 - <null>
1 - P5 - Product5 - <null>


how can I make query such that ?
The PODETAIL.PO_ID will be sent as parameter.

please note that the biggest problem is there is a WHERE parameter that
limited the PODETAIL.PO_ID.

rgds
herman


[Non-text portions of this message have been removed]