0

// 这是我试图编译的整个查询

//下面是有错误的代码。我无法弄清楚。

//查询开始

//错误:从“UPDATE d FROM....”开始,这个语法正确吗?

UPDATE d FROM Deployment d INNER JOIN Employment e ON d.employment_id = e.employment_id where e.consultant_id=14
   SET d.date_end = '2012-10-17',
       d.updated_by = 4,
       d.updated_date = SYSDATE()
 WHERE e.consultant_id = 14
   AND date_end IS NULL;

//代码到此结束

4

1 回答 1

2
UPDATE Deployment d 
INNER JOIN Employment e ON d.employment_id = e.employment_id SET d.date_end = p_date_e`nd, 
d.updated_by = p_loggedin_user_id, d.updated_date = SYSDATE() 
WHERE e.consultant_id = p_consultant_id
AND d.date_end IS NULL;
于 2012-10-19T08:21:20.443 回答