Hi,
Favour
me in suggest a hint in writing a sql for following
scenaio:
Table
A has 2 columns ord_id and line_id
example rows are:
ord_id
line_id
17
null
null 42
Table B has columns ord_id and
line_id
ord_id
line_id
17
42
17
43
17 44
I have
to write a sql to count(*) from table A where ord_id=17 ..
as u
see from table B line 42 is row of ord_id=17 ..so i want
count(*) should show =2 from tabel A
but if
i do count(*) from table A where ord_id=17..it shows 1..
i need
to put another condition which will check line id with
TABLE
B and if it is for this particular order ...add that also
in
count(*).............
I know
scenario is little fuzzy sorry for it..but if u got my point
kindly
respond.
Thanks
Harvinder