Page 1 of 1

SQl Query

Posted: Tue 25 Mar 2008 17:05
by fire.tiger
Hello,

I have just simple question. It is not critical, but just interests me.

I'm using TOraQuery.
When I run this SQL :

Code: Select all

select * from JOBS
everything works nice.
But when I use

Code: Select all

select * from JOBS;
(including semi-colon)
then an OraError is raised - invalid character.

I'm using Query.ExecSQL procedure.

Why? When I'm using SQL statement including semi-colon
in (for example) SQL command line, it works...

Posted: Wed 26 Mar 2008 09:31
by jfudickar
The point is: the ";" is not a valid part of a sql statement.

The definition of the ";" cames from the sql*plus.

SQL*plus uses the ";" to separate sql statements. Additional it uses the "/" for pl/sql blocks.
So the ";" is a separator and TOraQuery doesn't support the separators. They are only support by the TOraScript.

Greetings
Jens

Posted: Wed 18 Jun 2008 15:11
by Andreas Heinrich
Hi,

you might be right with the ";" to Oracle.

But SDAC supports ";" in TMSQuery! And this difference between SDAC and ODAC is a problem for me.


Thanks.
Andreas

Posted: Thu 19 Jun 2008 14:14
by Challenger
You can archive similar result in Oracle using PL/SQL block. Include seperated by ";" statements into BEGIN END; block.