OraScript changed sql parse behavior

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sinys
Posts: 186
Joined: Tue 21 Feb 2012 03:44

OraScript changed sql parse behavior

Post by sinys » Fri 17 Oct 2014 15:03

XE2, ODAC 9.4

Code: Select all

procedure TForm2.Button1Click(Sender: TObject);
begin
  OraScript1.SQL.Text := 'select * from dual;';
  ShowMessage(OraScript1.Statements[0].SQL); // without semicolon
  OraScript1.SQL.Text := 'with a as (select * from dual) select * from a;';
  ShowMessage(OraScript1.Statements[0].SQL); // with semicolon
end;
I think that both variants must be without semicolon.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: OraScript changed sql parse behavior

Post by AlexP » Mon 20 Oct 2014 08:46

Hello,

Currently, you can use a '/' character as a query separator in the script. We will consider the possibility to implement support for ';' as a separator for WITH queries.

Code: Select all

Select * from dual
/
WITH
  FUNCTION with_function(p_id IN NUMBER) RETURN NUMBER IS
  BEGIN
    RETURN p_id;
  END;
SELECT with_function(1)
FROM   dual
WHERE  rownum = 1
/
with a as (select * from dual) select * from a
/

sinys
Posts: 186
Joined: Tue 21 Feb 2012 03:44

Re: OraScript changed sql parse behavior

Post by sinys » Mon 08 Oct 2018 12:02

As far I understand topic problem was fixed?
But I have one more situation with the same problem for script
"grant connect, resource, create table, create view, create procedure, debug connect session to SH identified by SH;"
ODAC 10.2.7

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: OraScript changed sql parse behavior

Post by MaximG » Tue 09 Oct 2018 15:01

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next ODAC build.

sinys
Posts: 186
Joined: Tue 21 Feb 2012 03:44

Re: OraScript changed sql parse behavior

Post by sinys » Wed 10 Oct 2018 07:56

When are you planning release the version with fix?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: OraScript changed sql parse behavior

Post by MaximG » Thu 11 Oct 2018 06:54

We are planning to release a new build of our products next month. Now we can send you a night build including the necessary changes. For this, please specify your license number and the exact version of Delphi you are using via the e-support form (https://www.devart.com/company/contactform.html)

Post Reply