People,
The following script works (I have confirmed it by doing two separate
views and doing a select on them) - but I don't understand why there
isn't a recursion problem with c1.policy and c2.policy - is there some
sort of trick happening?
Thanks,
Phil.
SELECT c1.loc, c1.lob, c1.policy
FROM crec
AS c1
WHERE c1.t_type = '1'
AND c1.t_diss = '2'
AND c1.recon = 'Y'
AND c1.policy = ( SELECT c2.policy
FROM crec
AS c2
WHERE c2.t_type = '1'
AND c2.t_diss = '0'
AND c2.recon = 'N'
AND c1.loc = c2.loc
AND c1.lob = c2.lob
AND c1.policy = c2.policy )
ORDER BY c1.loc, c1.lob, c1.policy ;
--
Philip Rhoades
Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
Mobile: +61:0411-185-652
Fax: +61:2:8923-5363
E-mail: phil@chu.com.au