Matheus Garcia wrote:
> Although I saw it's possible to do something like that in Oracle PL-SQL,
> I couldn't run any samples I got on internet in SQuirrel SQL. My oracle
> connection is correctly configured, I can run simple sql commands, but
> when I try to somethibng like the the following code:
>
> DECLARE
> v1 NUMBER(3);
>
> BEGIN
> v1 := 3;
> select 1 from dual
> END;
>
> the DECLARE keywork appears in red, and when I try to run I got the
> following error: "java.lang.IllegalArgumentException: No SQL selected
> for execution."
Make sure you leave no gaps in your SQL and make sure you follow
your procedural code with a /
DECLARE
v1 NUMBER(3);
BEGIN
v1 := 3;
select v1 from dual
END;
/
The above should now run :)
Also you can do parameters like MSQL:
First off make sure you have SQL Parametrisation turned on (found
under Plugins -> Summary (and called sqlparam).
Then you can do
SELECT :var FROM dual
and Squirrel should ask you for the value of :var.
Regards
D.
|