I have 3 tables A,B,C. I have item common col in each table. I need to display all the items form table A and B after where conditions. i am doing something like this.
SELECT dbo.ttdilc101201.t_item, dbo.ttdilc101201.t_cwar, dbo.ttdilc101201.t_loca, dbo.ttdilc101201.t_clot, dbo.ttdilc101201.t_date, dbo.ttdilc101201.t_strb,
dbo.ttdilc101201.t_stro, dbo.ttiitm001201.t_dsca, dbo.ttipcs021201.t_dsca AS EXPR1, dbo.ttdilc101201.t_strs
FROM dbo.ttdilc101201, dbo.ttipcs021201 ,dbo.ttiitm001201
WHERE dbo.ttdilc101201.t_cwar = '12'
AND dbo.ttdilc101201.t_loca = 'BULK STO'
and dbo.ttdilc101201.t_strs > 0
and dbo.ttdilc101201.t_item = dbo.ttipcs021201.t_item
OR dbo.ttipcs021201.t_item = dbo.ttiitm001201.t_item
Thanks
SELECT dbo.ttdilc101201.t_item, dbo.ttdilc101201.t_cwar, dbo.ttdilc101201.t_loca, dbo.ttdilc101201.t_clot, dbo.ttdilc101201.t_date, dbo.ttdilc101201.t_strb,
dbo.ttdilc101201.t_stro, dbo.ttiitm001201.t_dsca, dbo.ttipcs021201.t_dsca AS EXPR1, dbo.ttdilc101201.t_strs
FROM dbo.ttdilc101201, dbo.ttipcs021201 ,dbo.ttiitm001201
WHERE dbo.ttdilc101201.t_cwar = '12'
AND dbo.ttdilc101201.t_loca = 'BULK STO'
and dbo.ttdilc101201.t_strs > 0
and dbo.ttdilc101201.t_item = dbo.ttipcs021201.t_item
OR dbo.ttipcs021201.t_item = dbo.ttiitm001201.t_item
Thanks