Hi Gentelmen;
I have posted this question in the Test and Playground Forum but no one has responded.
Any of you experts in this forum may be able to help me please...
I have this problem where I am selecting records to display on the report from table customer and trying to count how many booking are there for each customer in booking table based on the customer id from booking table.
here is my query code below...
select id name city custtype discount into (wa-scid, wa-scname, wa-sccity, wa-scctype, wa-scdisc) from customer where city = 'CityName' and country = 'CountryName' and exists ( select count( distinct custid ) as wa-cnt from bookings group by custid ). WRITE: /1 wa-scid, 11 wa-scname, 40 wa-sccity, 70 wa-scctype, 78 wa-scdisc,'%', 90 wa-cnt. endselect.
I have tried to debug the issue and seems like the sub query is not being executed. The reason i say that because the value of wa-cnt which is a counter of type i is not changing.
Any one can shed some light in this matter/problem please...
Many Thanks.
-hisheeraz