Subject Re: ISQL & trigger
Author giulfin2002
> First you said you were using isql; next, you said you were using
an interactive statement processor. Which is it?

But isn't ISQL "Interative SQL" ? Isn't Mitec IB Query an interactive
ISQL editor ?

Well ... my problem is:
I need to create a counter field, with primary key funtion. I have to
hardcode the create statements in a java application, but before I
need to test them.

To perform the test i tryed the Mitec IB Query program.
If you can suggest me a better GPL/Open source program it would be
apreciated..

So I need to try some statement before to pass them trought a
Java-JDBC DDL statement.

By the way, ** IF ** there are some differences between the statements
I would pass trought the JDBC driver and the ones I need to pass at
the Mitec, ** please** tell me which they are !!


Just start with an exaple I tried
http://firebird.sourceforge.net/manual/migration-mssql-data-types.html
==========================================================
CREATE TABLE my_table (
my_number integer not null primary key
)
==========================================================
CREATE GENERATOR my_generator
==========================================================
--- added by me
SET TERM !!;
--- added by me
CREATE TRIGGER my_before_trigger FOR my_table
BEFORE INSERT
AS
BEGIN
IF (NEW.my_number IS NULL)
THEN NEW.my_number = GEN_ID(my_generator, 1);
END
--- added by me
SET TERM ; !!
--- added by me
==========================================================

the table and the generator are correctly created ;
the trigger not :(


Thanks in advance for your help !!

Giuliano