I need to pull data from all tables based on the WHERE clause and also need additional CLOSURE Table data for that APPL_ID
Please let me know whether below query works or not. Thanks
Code:
EXEC SQL
SELECT A.APPL_ID
A.NAME
C.ADDRESS_LINE1
C.CITY
E.RPT_GOVT_NBR
E.RPT_CLS_FI_NUM
FROM APPLICANT A
INNER JOIN APP_ADDR B
ON A.APPL_ID = B.APPL_ID
INNER JOIN ADDRESS C
ON B.ADDR_ID = C.ADDR_ID
INNER JOIN BUREAU D
ON A.APPL_ID = D.APPL_ID
INNER JOIN CLOSURE E
ON D.CLS_ID = E.CLS.ID
WHERE A.GOVT_NBR = :GOVT-NBR
AND C.ADDRESS_LINE1 = :LINE1
AND C.CITY = :CITY
Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Fri Feb 02, 2007 5:13 pm Post subject:
nandra2180,
Try this link
Code:
SELECT A.APPL_ID
,A.NAME
,C.ADDRESS_LINE1
,C.CITY
,E.RPT_GOVT_NBR
,E.RPT_CLS_FI_NUM
FROM APPLICANT A
,APP_ADDR B
,ADDRESS C
,BUREAU D
,CLOSURE E
WHERE A.APPL_ID = B.APPL_ID
AND B.ADDR_ID = C.ADDR_ID
AND A.APPL_ID = D.APPL_ID
AND D.CLS_ID = E.CLS.ID
AND A.GOVT_NBR = :GOVT-NBR
AND C.ADDRESS_LINE1 = :LINE1
AND C.CITY = :CITY
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum