Results 1 to 2 of 2

Thread: ANSI/ISO Syntax

  1. #1
    Join Date
    Jun 2004
    Posts
    13

    Unanswered: ANSI/ISO Syntax

    Can anybody tell me the correct ANSI/ISO Syntax fr the Query:

    Select distinct N_PHN_AREACD
    From Donor_Visit, NAT_PHN_DB_REC
    WHERE COUNT_INSTID = N_PHN_INSTID(+)
    AND N_PHN_PHTYP (+) = 'D'
    AND N_PHN_PHTYP (+) = 'E'

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    I don't have 9i to test with right now, but I'll hazard a guess:

    Select distinct N_PHN_AREACD
    From Donor_Visit
    left outer join
    ( select N_PHN_INSTID, N_PHN_AREACD
    from NAT_PHN_DB_REC
    where N_PHN_PHTYP = 'D'
    and N_PHN_PHTYP = 'E'
    )
    on COUNT_INSTID = N_PHN_INSTID;

    BTW it would help us to help you if you used table aliases so we don't have to guess what columns come from what tables, and if you were consistent about use of upper/lower case throughout your query to aid readability ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •