query of 2 tables
i have this tables :
quote:
--------------------------------------------------------------------------------
Prd
p_makat name
1 aaa
2 bbb
3 ddd
tbl
P_makat Set_no
1 4
2 3
--------------------------------------------------------------------------------
this is the result
quote:
--------------------------------------------------------------------------------
P_makat Set_no
1 4
2 3
3 NULL
--------------------------------------------------------------------------------
2 questions :
1)how can i get the result from the first 2 tables?
2)how can i get for example the result of p_makat=3
from table 1 even if it dosent exist in table 2?
so i will see al table 1 detailes and from table 2 i will see that the valu dosent ecist?
thanks in advane
peleg
query of 2 tables
Moderator: General Moderators
I think this will work:
Code: Select all
SELECT
prd.p_makat,
tbl.set_no
FROM prd
LEFT JOIN tbl ON tbl.p_makat = prd.p_makat- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
i added w where and it didnt help :
i did L:
opppsssssory it workd great now:)
thanks *1000000000000000000000$
Code: Select all
SELECT
common.products.p_makat,
tblweightstations.set_no
FROM common.products
LEFT JOIN tblweightstations ON tblweightstations.p_makat = common.products.p_makat where tblweightstations.p_makat='6502'opppsssssory it workd great now:)
thanks *1000000000000000000000$