Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UPDATE SET query Oracle 9i
"tojo" <Tojo_at_hotmail.com> wrote in message
news:MPG.19be5dd9ace390639896a5_at_news.t-online.de...
> In article <1900676b.0309012236.2970d95d_at_posting.google.com>,
> hdekker_at_sparxsystems.com.au says...
> > Help required re: Oracle 9i update query...
> >
> > SQL> UPDATE t_connector SET StyleEx =
> > 2 (SELECT 'FKS=' || ps.Name || ':;FKT=' || pt.Name || ':;'
> > 3 FROM t_operation os, t_operation ot, t_operationparams ps,
t_operationparams pt
> > 4 WHERE os.OperationID = ps.OperationID
> > 5 AND c.Start_Object_ID = os.Object_ID
> > 6 AND os.Stereotype = 'FK'
> > 7 AND ot.OperationID = pt.OperationID
> > 8 AND c.End_Object_ID = ot.Object_ID
> > 9 AND ot.Stereotype = 'PK')
> > 10 AND t_connector.Connector_ID = c.Connector_ID;
> > AND t_connector.Connector_ID = c.Connector_ID
> > *
> > ERROR at line 10:
> > ORA-00933: SQL command not properly ended
> >
> Your SQL reduces to:
>
> UPDATE t_connector SET StyleEx =
> (SELECT *something*)
> AND t_connector.Connector_ID = c.Connector_ID;
>
>
> I think you misplaced your right parenthesis.
That was my first thought too but actually I think you have over reduced it.
it reduces to
UPDATE t_connector SET StyleEx =
(SELECT *something*
FROM t_operation os, t_operation ot, t_operationparams ps,
t_operationparams pt
WHERE ....
)
AND t_connector.Connector_ID = c.Connector_ID
So in addition to no where clause on the update, I also don't see a table defined with an alias of c.
-- Niall Litchfield Oracle DBA Audit Commission UKReceived on Tue Sep 02 2003 - 05:23:25 CDT