Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Location
    SA
    Posts
    25

    Unanswered: Query to be run against both SQL and Oracle database

    HI

    I'm in a pickle at the mo, because I need to run a query against bothe SQL and Oracle db. I've been made aware that Oracle does not like inner or outer join syntax.
    I need the following to be fixed so that it works in bith scenario.
    have been on this forum before with the same question and andrew kindly had answered it. But the answer he provided unfotunately does not solve the problem (which I thought did). The original question was I have a query which needs to be run against both Oracle ans SQL database hence syntax like inner or outer joins cannot be used. I've also been made aware that "NOT Exists" syntax also is not liked by Oracle!!

    The original query was

    "SELECT DISTINCT Training_Course_AppUser.Course_ID, Training_Course_AppUser.AppUser_ID, Training_Course_AppUser.Site_ID," & _
    " AppUser_TrainingCourse.Completion_Date , Training_Course.Title " & _
    " FROM Training_Course INNER JOIN" & _
    " Training_Course_AppUser ON Training_Course.ID = Training_Course_AppUser.Course_ID LEFT OUTER JOIN" & _
    " AppUser_TrainingCourse ON Training_Course_AppUser.AppUser_ID = AppUser_TrainingCourse.AppUser_ID AND" & _
    " Training_Course_AppUser.Course_ID = AppUser_TrainingCourse.Course_ID" & _
    " WHERE Training_Course_AppUser.AppUser_ID = " & lUserID & " AND AppUser_TrainingCourse.Completion_Date IS NULL "


    All help appreciated. I have been to another forum, but the syntax they suggested included "NOT EXISTS"!

    N

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    NOT EXISTS should work and the join sytax should also work if you have 9i I think.

    Alan

  3. #3
    Join Date
    Mar 2003
    Location
    SA
    Posts
    25

    SQL query needs to be used against SQL and Oracle database

    Originally posted by AlanP
    NOT EXISTS should work and the join sytax should also work if you have 9i I think.

    Alan
    It does work and thanks for your reply.

Posting Permissions

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