473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 2619

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

Similar topics

4
by: dw | last post by:
Hello all. We're doing a site with teams and their members. We've got a page where we need to display people according to who belongs to a which team. I've heard that nested loops are bad, but...
2
by: Forgone Conclusion | last post by:
Hi, I have a View that groups and sums up totals. This View is then nested within in another View and used (it needs to be done like this). What i need to do is to be able to vary the records...
3
by: WGW | last post by:
Though I am a novice to MS SQL server (2000 I believe), I can do almost! everything I need. Maybe not efficiently, but usefully. However, I have a problem -- a complex query problem... I can...
12
by: Jeff Lanfield | last post by:
First of all, I apologize if coalescing is not the right term to describe my problem. I have a tree where each node has the same set of attributes (is the same entity) but child nodes should...
7
by: Anthony Robinson | last post by:
Have been encountering an odd issue. Every now and again, certain packages of stored procedures just become invalid. I'm aware that dropping or altering an underlying table would render a package...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
1
by: Thu | last post by:
Hi, I create a Dataset to link three tables in my Access database. E.g. The three tables are , , . I then create 2 DataRelations, 1st relation (Order_Cust_Rel) links and using CustomerID field...
25
by: GY2 | last post by:
I writing some documentation and I want to describe a common code structure which is used to step through all the items in a collection (e.g. each file in a subdirectory) while applying more and...
3
by: Frank Swarbrick | last post by:
I was just messing around trying to learn things and attempted the following: select brch_nbr , sum(case when post_flag != 'P' then amount else 0 end) as sum_amount from film.film_transactions...
9
by: P3Eddie | last post by:
Hello all! I don't know if this can even be done, but I'm sure you will either help or suggest another avenue to accomplish the same. My problem may be a simple find duplicates / do something...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.