469,929 Members | 1,575 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

Nested Select ..

Hi Everyone..

I am new to DB2 .I wish to compare the data of parent query within the nested select statement that is named as Agency. I am getting error SQLSTATE 42601: An unexpected Token 'CIFIQ_BUSN_ENTIT1 ' was found follwing "".

Please help me ..

Syntax is as below :


Select

CIFIQ_BUSN_ENTIT.NCIFIQ_PRIM AS NAME ,
,
(Select CIFIQ_BUSN_ENTIT1.NCIFIQ_PRIM

FROM

DVLP4.BPSUB_SBMIT BPSUB_SBMIT1, DVLP4.CIFIQ_BUSN_ENTIT CIFIQ_BUSN_ENTIT1 ,DVLP4.BPSBE_SBMIT_ENTIT BPSBE_SBMIT_ENTIT1

where (BPSUB_SBMIT1.IBPSUB = BPSBE_SBMIT_ENTIT.IBPSUB AND
BPSBE_SBMIT_ENTIT1.ICIFIQ = CIFIQ_BUSN_ENTIT.ICIFIQ AND
BPSBE_SBMIT_ENTIT1.CCIFIQ_TYPE = CIFIQ_BUSN_ENTIT.CCIFIQ_TYPE AND
CIFIQ_BUSN_ENTIT1.CCIFIQ_TYPE = 'AG')

) AS AGENCY


from

DVLP4.BPSUB_SBMIT BPSUB_SBMIT,
DVLP4.CIFIQ_BUSN_ENTIT CIFIQ_BUSN_ENTIT,
DVLP4.BPSBE_SBMIT_ENTIT BPSBE_SBMIT_ENTIT

where

BPSUB_SBMIT.IBPSUB = BPSBE_SBMIT_ENTIT.IBPSUB AND
BPSBE_SBMIT_ENTIT.ICIFIQ = DVLP4.CIFIQ_BUSN_ENTIT.ICIFIQ AND
BPSBE_SBMIT_ENTIT.CCIFIQ_TYPE = DVLP4.CIFIQ_BUSN_ENTIT.CCIFIQ_TYPE
Jan 24 '07 #1
0 2518

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by dw | last post: by
2 posts views Thread by Forgone Conclusion | last post: by
12 posts views Thread by Jeff Lanfield | last post: by
7 posts views Thread by Anthony Robinson | last post: by
3 posts views Thread by Tcs | last post: by
3 posts views Thread by Frank Swarbrick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.