Page 1 of 1

OraScript changed sql parse behavior

Posted: Fri 17 Oct 2014 15:03
by sinys
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.

Re: OraScript changed sql parse behavior

Posted: Mon 20 Oct 2014 08:46
by AlexP
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
/

Re: OraScript changed sql parse behavior

Posted: Mon 08 Oct 2018 12:02
by sinys
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

Re: OraScript changed sql parse behavior

Posted: Tue 09 Oct 2018 15:01
by MaximG
Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next ODAC build.

Re: OraScript changed sql parse behavior

Posted: Wed 10 Oct 2018 07:56
by sinys
When are you planning release the version with fix?

Re: OraScript changed sql parse behavior

Posted: Thu 11 Oct 2018 06:54
by MaximG
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)