[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SQL Help



Hello
please guide me........
this is matter....

select a.zon,  b.astyer, count(a.ntn)
from ztrmtrext a, rtnmtr b
where
a.ntn =  b.ntn and b.astdat is null
and astyer='2003'
group by a.zon,b.astyer

select a.zon,  b.astyer, count(a.ntn)
from ztrmtrext a, rtnmtr b
where
a.ntn =  b.ntn and b.astdat is null
and astyer='2002'
group by a.zon,b.astyer

this is query.
but actually i want to fatch each year record in a separate variable and in a single query how it is possible.

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



Reply to: