Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL statement works with SQL/Plus - but not with ODBC
"Christian Weyer" <christian.weyer_at_eyesoft.de> ????? news:3AD19EEE.E83440E9_at_eyesoft.de...
> Hi all,
> I have a rather complex SQL statement:
> ---
> BEGIN
> UPDATE ContentDataTable
> SET SYMBOLIC_PATH_PARENT = N'/Test',
> SYMBOLIC_NAME = N'HAWK01.GIF',
> VERSION_NUMBER = 1 +
> SELECT MAX(VERSION)
> FROM
[snip]
You didn't mention the version of Oracle. The syntax is legal in Oracle8i, not prior to Oracle8i. You may change as following:
UPDATE ... SET ...
VERSION_NUMBER = (SELECT 1+MAX(VERSION) ... ) ...
It does not need to be put into a PL/SQL block, remove the BEGIN/END.
Received on Tue Apr 10 2001 - 10:12:22 CDT