|
Posted by solonzenetzis on 02/18/07 11:54
hello
I need some help. The following query works perfectly:
------------------------------------------------------------------
select *
from tableA, tableB
where tableA.num=tableB.order
and tableA.num in (
select tableB.order from tableA, tableB
where
tableB.order=tableA.num
and tableB.cust_no=4895
)
------------------------------------------------------------------
I need to do the following:
------------------------------------------------------------------
select *
from tableA, tableB
where tableA.num=tableB.order
and tableA.num in (
select tableB.order, sum(tableB.ok) as s_ok from tableA, tableB
where
tableB.order=tableA.num
and tableB.cust_no=4895
and s_ok<5
)
------------------------------------------------------------------
but it is not possible
Can anyone help me?
thank you in advance
Navigation:
[Reply to this message]
|