Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL UPDATE

657009Aug 28 2008 — edited Aug 28 2008
Dear All

Below sql is my target query, but it throws some errors:

UPDATE MTP_ROUTING mtpRouting,SPLNKREM spLnkRem,SCCP_ROUTING tempSuaSpenhs ,REF_IP_PROTOCOL refIp
SET mtpRouting.TRAFFIC_TYPE_ID = refIp.ID,
mtpRouitng.SCTP_ASSOCIATION_ID = spLnkRem.SCTP_ASSOCIATION_ID
WHERE tempSuaSpenhs.LISTID = spLnkRem.SPLNKREM_ID
AND mtpRouting. ADJ_DPC = tempSuaSpenhs.DPC
AND mtpRouitng.NE = tempSuaSpenhs.NE
AND mtpRouting.NET_ID = tempSuaSpenhs.NET_ID
AND mtpRouting.TRAFFIC_TYPE_ID IS NULL
AND refIp.IP_PROTOCOL = 'SUA';


Error report:
SQL Error: ORA-00971: missing SET keyword
00971. 00000 - "missing SET keyword"

Plz help to dig out of this error.


Rgds
Prem

Comments

521217
You can't update several tables in 1 statement.
Pavan Kumar
Hi,

First Thing is that you query is wrong you can not Update the table like that.
Second thing is that there does not exits any relation between the tables
"MTP_ROUTING mtpRouting" and "REF_IP_PROTOCOL refIp"

Third is that your required query will be like this

Update table
Set Columns = < Sub query>
Where <Conditions>.

Please post the correct joining conditions between the tables so that we can able to help you.

Please go through this link
2710189

- Pavan Kumar N
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 25 2008
Added on Aug 28 2008
2 comments
440 views