Colin Bell wrote:
> I believe the syntax for Oracle is something like:
>
> begin
> asc_version ('3-2-1-030519', 'HP 9Z','Cashier Session Report fix', NULL);
> end;
Yes, that is the correct syntax (My understanding is that 'execute' is a
SQL*Plus-specific thing. SQL*Plus drops the execute and wraps a
begin/end around the line of code in the background). You can also do:
declare
...
begin
...
end;
if you need to define variables that are used in the PL/SQL block.
> Just remember to change the Statement Separator setting in your session from ;
> to something else before you try running the procedure.
Ah, that's how you do it. I was wondering why I could never get a
begin/end block to work. I thought that block was getting split up into
multiple statements, but for whatever reason changing the Statement
Separator didn't occur to me. Thanks Colin. (this may be something for
a FAQ?)
Colin, just out of curiosity, does the SQuirreL Plug-In API have
anything that would allow a plug-in to define code-block
initiators/terminators (i.e. begin/end or declare/end) to tell SQuirreL
not to split those blocks up into multiple statements, irregardless of
the current Statement Separator?
> You could also try the JDBC escape syntax:
>
> {call asc_version ('3-2-1-030519', 'HP 9Z','Cashier Session Report fix', NULL)}
That doesn't appear to work with Oracle. When I try this, I get a
error: "Error: java.sql.SQLException: ORA-00928: missing SELECT keyword".
Maury...
--
Maury Hammel
Cronus Technologies Inc.
http://www.cronustech.com
|