hello,
i have these queries in oracle:
the first one i made it to get the count, and it is working. but when i try to run the second query in order to put records in count (*) to a.count it is gave me errors. also, a.count column is an empty column i wana transfer record from that logical count (*) to a.count.
i have these queries in oracle:
the first one i made it to get the count, and it is working. but when i try to run the second query in order to put records in count (*) to a.count it is gave me errors. also, a.count column is an empty column i wana transfer record from that logical count (*) to a.count.
Code:
select count (*), a.start_msisdn, a.end_msisdn,a.quantity, a.count from TMP_MSISDN a, dbdev.subscribers b where b.msisdn between a.start_msisdn and a.end_msisdn group by a.start_msisdn, a.end_msisdn,a.quantity, a.count
Code:
UPDATE tmp_msisdn a
SET a.count = ( select count (*)
from TMP_MSISDN a, dbdev.subscribers b
where b.msisdn between a.start_msisdn and a.end_msisdn
group by a.start_msisdn, a.end_msisdn,a.quantity)
WHERE EXISTS
( select count (*)
from TMP_MSISDN a, dbdev.subscribers b
where b.msisdn between a.start_msisdn and a.end_msisdn
group by a.start_msisdn, a.end_msisdn,a.quantity);