By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,589 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,589 IT Pros & Developers. It's quick & easy.

Nested Select ..

P: 48
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
Share this question for a faster answer!
Share on Google+

Post your reply

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