| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> SELECT within the FROM clause?
I have never seen code where there is a SELECT within the FROM clause like
below. I have always seen it in the WHERE clause. Can anybody explain what
a SELECT in this location is doing?
P.S.: This is not my code - I'm just trying to figure it out and maybe tune it if I can after I can understand what it's doing.
FROM CLAIM.CLM_RX A, (SELECT DISTINCT
A.AHFS_THPY_CD,
A.TYPE_1,
NULL AS TYPE_2,
A.SPFC_THPY_CLASS_CD,
B.NATL_DRUG_CD AS NDC,
A.HMP_DISEASE_CODE
FROM
bcn_hmp.ref_hmp_rx_class A,
RPT.DB2_NDC B
WHERE
A.AHFS_THPY_CD=B.AHFS_THPY_CD
AND A.HMP_DISEASE_CODE
IN('LL','ST')) B
![]() |
![]() |