|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ISQL & trigger
Hi !
I need a ID (type COUNTER) field in my table, and I discovered that with firebird I have to create a generator to achieve the result (But why ? isn't counter a SQL92 standard ?? ) Just to try and see what happens, I tried with Mitec IBQuery the exaple given in http://firebird.sourceforge.net/manual/migration-mssql-data-types.html Considering the command was given interactively, i prepended the SET TERM !! ; as advised in http://www.destructor.de/firebird/storedproc.htm But after having created the exaple table and the example generator, when I try to execute the trigger command here's what happens: SET TERM !! ; 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 !! set term ; !! What I get is Statement #2: Dynamic SQL Error SQL error code = -104 Token unknown - line 5, char 80 END Why ? H2SO4 |
|
#2
|
|||
|
|||
|
Quote:
Read documentation. Syntax for Assignment statement is variable = <expression> ; |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > ISQL & trigger |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|