I have found a solution to a problem I am working on but need some help understanding the SQL statement. A sampling of the tables:
LGLINE (table)
inv_num
line_num
prod_SKU
line_Qty
line_Price
LGPRODUCT (table)
prod_SKU
prod_Desc
....
The working query starts with the following:
SELECT l.inv_num, l.line_num, p.prod_sku,
p.prod_descript, l2.line_num, p2.prod_sku,
p2.prod_descript, p.brand_id
FROM (lgline AS l INNER JOIN lgproduct AS p
ON l.prod_sku = p.prod_sku)
INNER JOIN
(lgline AS l2 INNER JOIN lgproduct AS p2
In my study to this point, I have not seen how the l.inv_num, l.line_num, p.prod_sku syntax works.
The inv_num in the first line of the query is the name of the field but what does the l. (ldot) and p. (pdot) do and how does it work.
Thank you for your help.