8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

Bring employee database up to dialect 3

This commit is contained in:
paul_reeves 2005-02-08 14:55:23 +00:00
parent 83618e0365
commit 7de72dd72a
4 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,7 @@
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
set sql dialect 1;
set sql dialect 3;
/* create database 'employee.fdb'; */
create database 'empbuild.fdb';
show version;

View File

@ -45,6 +45,7 @@ static int addqtr (void);
static TEXT Db_name[128];
static FILE *Fp;
EXEC SQL SET SQL DIALECT 3;
EXEC SQL INCLUDE SQLCA;

View File

@ -244,6 +244,7 @@ SET TERM !! ;
CREATE TRIGGER set_emp_no FOR employee
BEFORE INSERT AS
BEGIN
if (new.emp_no is null) then
new.emp_no = gen_id(emp_no_gen, 1);
END !!
@ -396,6 +397,7 @@ SET TERM !! ;
CREATE TRIGGER set_cust_no FOR customer
BEFORE INSERT AS
BEGIN
if (new.cust_no is null) then
new.cust_no = gen_id(cust_no_gen, 1);
END !!

View File

@ -45,6 +45,7 @@ static int addqtr (void);
static TEXT Db_name[128];
static FILE *Fp;
EXEC SQL SET SQL DIALECT 3;
EXEC SQL INCLUDE SQLCA;