Subject | Re: [firebird-support] Re: Dumb Question |
---|---|
Author | Rafael Szuminski |
Post date | 2003-12-09T21:54:18Z |
IBExpert has two areas where you can execute SQL statements: SQL Editor and
Script Executive
SQL Editor can only execute one statement at a time
Script Executive runs scripts :-)
The default delimiter is ; but you will run into issues when you have to create
a table or store procedure. So, we have to use SET TERM to set a temp delimiter.
For instance:
select * from employees;
delete from employees where.....;
set term ^;
create stored procedure
.........
end;
^
create table ....
^
set term ;^
select * from customers;
etc.
Makes sense?
Raf
chumlyii wrote:
Rafael Szuminski
Email:raf@...
Phone:(949)939 - 2458
www.BDCSoftware.com
Script Executive
SQL Editor can only execute one statement at a time
Script Executive runs scripts :-)
The default delimiter is ; but you will run into issues when you have to create
a table or store procedure. So, we have to use SET TERM to set a temp delimiter.
For instance:
select * from employees;
delete from employees where.....;
set term ^;
create stored procedure
.........
end;
^
create table ....
^
set term ;^
select * from customers;
etc.
Makes sense?
Raf
chumlyii wrote:
> I tried IBEXPERT and while it does have a button to Execute and fetch--
> all it still gives me an error when it hits the second statement. Is
> there some token/delimeter I should use between statments other
> than ';' or even '/'?
>
> select max(id) ASSAY_RULE from ASSAY_RULE;
> select max(id) ASSAY_STATUS from ASSAY_STATUS;
>
> can't format message 13:896 -- message file c:\Program
> Files\Borland\InterBase/interbase.msg not found.
> Dynamic SQL Error.
> SQL error code = -104.
> Token unknown - line 2, char 1.
> select.
>
>
> --- In firebird-support@yahoogroups.com, "Bogdan Mugerli"
> <mugerlibogdan@e...> wrote:
>
>>Hi
>>
>>We are using IBexpert for such things.
>>
>>Bogdan
>>
>>
>>
>>-----Original Message-----
>>From: chumlyii [mailto:bgt0990@o...]
>>Sent: Tuesday, December 09, 2003 5:07 PM
>>To: firebird-support@yahoogroups.com
>>Subject: RES: [firebird-support] Re: Dumb Question
>>
>>
>>What I was looking for was something along the lines of
>>
>>isql -user sysdba -password XXXXXXXX -input
>>d:\bgt\select_from_table.sql -output d:\bgt\results.bgt
>>d:\bgt\site_cem\nycem_fire.fdb
>>
>>This will let me run a script such as one created by
>>
>>select 'select max(id) '||RDB$RELATION_NAME||
>>'from '||RDB$RELATION_NAME||';' from RDB$RELATIONS
>>where RDB$RELATION_NAME not like ('RDB$%')
>>
>>Which will create the script
>>
>>select max(id) APPROVAL_STATUS from APPROVAL_STATUS ;
>>select max(id) APPROVAL_STATUS_LEGEND from APPROVAL_STATUS_LEGEND;
>>select max(id) ASSAY from ASSAY ;
>>select max(id) ASSAY_FIXED_VALUE from ASSAY_FIXED_VALUE ;
>>And another 60 lines
>
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Rafael Szuminski
Email:raf@...
Phone:(949)939 - 2458
www.BDCSoftware.com