ANSI SQL

  • From: Nirmalya Das <nirmalya@xxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 20 Jun 2006 13:52:47 -0700

I have the following SQL:

select ptd.MPID, ptd.FIRST_NAME, ptd.LAST_NAME, ptd.DOB,
ptd.SSN, ptd.ADMIT_STATUS_DESCR,
FD.FACILITYNO, FD.FACILITYNAME,
pdl.MD_FIRST_NAME, pdl.MD_LAST_NAME, pdl.MD_UPIN, mdd.LICENSE_NO,
mdd.OFFICE_PHONE, ptd.NOTES
FROM
(
    (
    PT_DATA PTD LEFT JOIN FACILITY_DATA FD  ON
    PTD.HOME_LOCATION_ID = TO_NUMBER(FD.BILLINGLOCATION_ID)
    AND FD.BILLINGLOCATION_ID IS NOT NULL
    )
    LEFT JOIN PT_DATA_LOCATION PDL ON
    PTD.MPID = PDL.MPID AND PTD.HOME_LOCATION_ID = PDL.LOCATION_ID
)
LEFT JOIN MD_DATA MDD ON PDL.NEPHROLOGIST_ID = MDD.ID
ORDER BY PDL.FACILITY_NO, PTD.MPID;

Can someone show me the translation of this query in Oracle SQL.

TIA
--
http://www.freelists.org/webpage/oracle-l


Other related posts: