Hi all,
I'm used to create and run SQL scripts in Microsoft SQL Server with
Query Analyser tool, something simple just like declaring some
variables, setting their values and using them on sql queries. Like the
following example:
DECLARE
@foo INTEGER
SET @foo = 1
INSERT INTO mytable (foofield) value (@foo)
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."
Could any of you please give me some help on doing that? Or running
scripts these way is not supported on Squirrel?
Best regards,
Matheus
|