how to write my sql query correct? I would like to use WHERE clause in query, but I don’t know how is correct. This is my query with mistake:
**SELECT pil.[Buy-from Vendor No_], pil.No_, pil.Amount, pil.Quantity
FROM dbo.[„blk“ 2011$Purch_ Inv_ Line]AS pil
WHERE pil.Type=5
LEFT JOIN dbo.[„blk“ 2011$Purch_ Inv_ Header] AS pih
ON pil.[Document No_]=pih.No_
ORDER BY pil.amount**
This is way you have handle left joins