locked
JOIN A TABLE WITH A STRING RRS feed

  • Question

  • HI,

    Please help me to convert this ORacle join query into SQL SERVER query

         

    SELECT
          PM00_AC_PROJECT.C_PROJECT_ID,
          PM00_MVIEW_AC.C_CAC_ID,
          PM00_MVIEW_AC.THIRD,
          PM00_MVIEW_AC.MSN,
          PM00_MVIEW_AC.STANDARDRNK
          FROM
          PM00_MVIEW_AC,PM00_AC_PROJECT,
             PM00_VIEW_CURRENT_WS,
          PM00_VIEW_PLANNING_DATE QGC_DATE
           WHERE
          PM00_AC_PROJECT.C_CAC_ID = PM00_VIEW_CURRENT_WS.C_CAC_ID (+)AND
    QGC_DATE.MILESTONE_CODE(+)='QGC'

    Regards,

    Chetan



    Best Regards, Chetan Navale | Atos India | chetan.navale@hotmail.co.in | 91-9373364792

    Wednesday, July 10, 2013 12:59 PM

Answers

  • Please see "Outer Joins" in this document: http://docs.oracle.com/cd/B28359_01/server.111/b28286/queries006.htm

    There must be more to this query, but this is what you posted:

    SELECT
          PM00_AC_PROJECT.C_PROJECT_ID,
          PM00_MVIEW_AC.C_CAC_ID,
          PM00_MVIEW_AC.THIRD,
          PM00_MVIEW_AC.MSN,
          PM00_MVIEW_AC.STANDARDRNK
    FROM
          PM00_MVIEW_AC,PM00_AC_PROJECT
          LEFT OUTER JOIN PM00_VIEW_CURRENT_WS
    		  ON PM00_AC_PROJECT.C_CAC_ID = PM00_VIEW_CURRENT_WS.C_CAC_ID 
          LEFT OUTER JOIN PM00_VIEW_PLANNING_DATE QGC_DATE
    		  ON QGC_DATE.MILESTONE_CODE='QGC'

    • Proposed as answer by Sofiya Li Thursday, July 11, 2013 10:36 AM
    • Marked as answer by Sofiya Li Wednesday, July 17, 2013 2:34 PM
    Wednesday, July 10, 2013 1:27 PM