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'

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'
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.