Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> SQL statement works with SQL/Plus - but not with ODBC

SQL statement works with SQL/Plus - but not with ODBC

From: Christian Weyer <christian.weyer_at_eyesoft.de>
Date: Mon, 09 Apr 2001 13:37:18 +0200
Message-ID: <3AD19EEE.E83440E9@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
(SELECT MAX(VERSION_NUMBER) AS VERSION
FROM ContentDataTable WHERE
SYMBOLIC_PATH_PARENT = N'/Test' AND
SYMBOLIC_NAME = N'HAWK01.GIF'
UNION
SELECT MAX(VERSION_NUMBER) AS VERSION
FROM RevisedContentDataTable WHERE
SYMBOLIC_PATH_PARENT = N'/Test' AND
SYMBOLIC_NAME = N'HAWK01.GIF'))
WHERE SYMBOLIC_PATH_PARENT = N'/Test' AND SYMBOLIC_NAME = N'HAWK02.GIF' AND VERSION_NUMBER = 1; END;
---

It works fine in SQL/Plus or SQL Worksheet and does what it should do ;-)

But when using it via ADO (the latest ODBC Driver!) I get the following error:

---

PLS-00103 found 'SELECT' but expected one of the following:

   ( - + mod not null others <an identifier>    <a double-quoted delimited-identifier> <a bind variable> avg    count current exists max min prior sql stddev sum variance    execute forall time timestamp interval date    <a string literal with character set specification>    <a number> <a single-quoted SQL string>
---

Any ideas?

Thanx,
Christian

-- 
___________________________________________________
eYesoft                        We see your visions.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Christian Weyer               http://www.eyesoft.de

christian.weyer_at_eyesoft.de    Bernhard-Krieg-Str. 4
Tel.: +49-9393-993161         97845 Neustadt/Main
___________________________________________________
       Building Smart Internet Architectures       
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Received on Mon Apr 09 2001 - 06:37:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US