JasonMcConnell
Technical User
Hi Guys
I new to SQL plus and was wondering if anybody can help with the following query?
The following query returns the information needed
SELECT
SEARCH."SEARCH_NUMBER", SEARCH_TYPE."PLANNING_HISTORY"
FROM
"SEARCH" SEARCH,
"SEARCH_TYPE" SEARCH_TYPE
WHERE
SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE" AND
SEARCH."SEARCH_NUMBER" = '2008/01439';
However I want to update a field where the application number is equal to 2008/01439. (I need to join to tables SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE")
I have tried the following without success
UPDATE SEARCH, SEARCH_TYPE
SET = PLANNING_HISTORY = "N"
where SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE" AND
SEARCH."SEARCH_NUMBER" = '2008/01439';
-----------
UPDATE SEARCH_TYPE, SEARCH
SET = PLANNING_HISTORY = "N"
where PLANNING_HISTORY IN
(SELECT
SEARCH."SEARCH_NUMBER",
SEARCH_TYPE."CODE", SEARCH_TYPE."PLANNING_HISTORY"
FROM
"LAND"."SEARCH" SEARCH,
"LAND"."SEARCH_TYPE" SEARCH_TYPE
WHERE
SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE" AND
SEARCH."SEARCH_NUMBER" = '2008/01439');
ERROR at line 1:
ORA-00971: missing SET keyword
Can anybody tell me what I am doing wrong?
I new to SQL plus and was wondering if anybody can help with the following query?
The following query returns the information needed
SELECT
SEARCH."SEARCH_NUMBER", SEARCH_TYPE."PLANNING_HISTORY"
FROM
"SEARCH" SEARCH,
"SEARCH_TYPE" SEARCH_TYPE
WHERE
SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE" AND
SEARCH."SEARCH_NUMBER" = '2008/01439';
However I want to update a field where the application number is equal to 2008/01439. (I need to join to tables SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE")
I have tried the following without success
UPDATE SEARCH, SEARCH_TYPE
SET = PLANNING_HISTORY = "N"
where SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE" AND
SEARCH."SEARCH_NUMBER" = '2008/01439';
-----------
UPDATE SEARCH_TYPE, SEARCH
SET = PLANNING_HISTORY = "N"
where PLANNING_HISTORY IN
(SELECT
SEARCH."SEARCH_NUMBER",
SEARCH_TYPE."CODE", SEARCH_TYPE."PLANNING_HISTORY"
FROM
"LAND"."SEARCH" SEARCH,
"LAND"."SEARCH_TYPE" SEARCH_TYPE
WHERE
SEARCH."SEARCH_TYPE" = SEARCH_TYPE."CODE" AND
SEARCH."SEARCH_NUMBER" = '2008/01439');
ERROR at line 1:
ORA-00971: missing SET keyword
Can anybody tell me what I am doing wrong?