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: Cremieux, Judith K. (ISFPC) <JKCREM_at_exchange.inland.com>
Date: Mon, 9 Apr 2001 08:21:09 -0500
Message-ID: <B2BC5A4F0D0AD311A21C00805FC76E92018B4A1D@sypointcast.inland.com>

try it without the BEGIN and END for ADO - just pass the SQL

> -----Original Message-----
> From: Christian Weyer [SMTP:christian.weyer_at_eyesoft.de]
> Posted At: Monday, April 09, 2001 6:37 AM
> Posted To: misc
> Conversation: SQL statement works with SQL/Plus - but not with ODBC
> Subject: SQL statement works with SQL/Plus - but not with ODBC
>
> 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 - 08:21:09 CDT

Original text of this message

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