0

Hi all,

I'm unable to get the below update SQL to run in Oracle, it's giving me th below error
ORA-00933: SQL command not properly ended. Any help appreciated.

UPDATE 
PDR.PH_Family_Match_by_Chassis a
SET a.Launched = 'Y'
INNER JOIN
PDR.domCHASSIS
ON
a.chassis_id = PDR.domCHASSIS.chassis_id
INNER JOIN PDR.domCHASSIS_MODULE
ON PDR.domCHASSIS.chassis_id = PDR.domCHASSIS_MODULE.chassis_id
INNER JOIN
PDR.domCHASSIS_OPTION
ON (PDR.domCHASSIS_MODULE.chassis_id = PDR.domCHASSIS_OPTION.chassis_id)
AND (PDR.domCHASSIS_MODULE.module_id = PDR.domCHASSIS_OPTION.module_id)
WHERE 
a.Launched='N' 
AND PDR.domCHASSIS.current_status_code='A' 
AND PDR.domCHASSIS_MODULE.current_status_code='A'
AND PDR.domCHASSIS_OPTION.current_status_code='A'
2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by rch1231
0

Hello,

I am not sure about SQL on Oracle but I believe it is like the other SQL languages and in MySQL and SQL Server JOINs only work in selects. For Updates you have to open multiple tables the old fashion way like this:

    UPDATE
    PDR.PH_Family_Match_by_Chassis, PDR.domCHASSIS, PDR.domCHASSIS_MODULE, PDR.domCHASSIS_OPTION 
    SET PDR.PH_Family_Match_by_Chassis.Launched = 'Y'
    WHERE
    PDR.PH_Family_Match_by_Chassis.chassis_id = PDR.domCHASSIS.chassis_id 
    AND PDR.domCHASSIS.chassis_id = PDR.domCHASSIS_MODULE.chassis_id 
    AND PDR.domCHASSIS_MODULE.chassis_id = PDR.domCHASSIS_OPTION.chassis_id 
    AND PDR.domCHASSIS_MODULE.module_id = PDR.domCHASSIS_OPTION.module_id 
    AND PDR.PH_Family_Match_by_Chassis.Launched='N'
    AND PDR.domCHASSIS.current_status_code='A'
    AND PDR.domCHASSIS_MODULE.current_status_code='A'
    AND PDR.domCHASSIS_OPTION.current_status_code='A'
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.