mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 23:23:02 +01:00
Bring employee database up to dialect 3
This commit is contained in:
parent
83618e0365
commit
7de72dd72a
@ -16,7 +16,7 @@
|
|||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
* Contributor(s): ______________________________________.
|
* Contributor(s): ______________________________________.
|
||||||
*/
|
*/
|
||||||
set sql dialect 1;
|
set sql dialect 3;
|
||||||
/* create database 'employee.fdb'; */
|
/* create database 'employee.fdb'; */
|
||||||
create database 'empbuild.fdb';
|
create database 'empbuild.fdb';
|
||||||
show version;
|
show version;
|
||||||
|
@ -45,6 +45,7 @@ static int addqtr (void);
|
|||||||
|
|
||||||
static TEXT Db_name[128];
|
static TEXT Db_name[128];
|
||||||
static FILE *Fp;
|
static FILE *Fp;
|
||||||
|
EXEC SQL SET SQL DIALECT 3;
|
||||||
|
|
||||||
EXEC SQL INCLUDE SQLCA;
|
EXEC SQL INCLUDE SQLCA;
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@ SET TERM !! ;
|
|||||||
CREATE TRIGGER set_emp_no FOR employee
|
CREATE TRIGGER set_emp_no FOR employee
|
||||||
BEFORE INSERT AS
|
BEFORE INSERT AS
|
||||||
BEGIN
|
BEGIN
|
||||||
|
if (new.emp_no is null) then
|
||||||
new.emp_no = gen_id(emp_no_gen, 1);
|
new.emp_no = gen_id(emp_no_gen, 1);
|
||||||
END !!
|
END !!
|
||||||
|
|
||||||
@ -396,6 +397,7 @@ SET TERM !! ;
|
|||||||
CREATE TRIGGER set_cust_no FOR customer
|
CREATE TRIGGER set_cust_no FOR customer
|
||||||
BEFORE INSERT AS
|
BEFORE INSERT AS
|
||||||
BEGIN
|
BEGIN
|
||||||
|
if (new.cust_no is null) then
|
||||||
new.cust_no = gen_id(cust_no_gen, 1);
|
new.cust_no = gen_id(cust_no_gen, 1);
|
||||||
END !!
|
END !!
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ static int addqtr (void);
|
|||||||
|
|
||||||
static TEXT Db_name[128];
|
static TEXT Db_name[128];
|
||||||
static FILE *Fp;
|
static FILE *Fp;
|
||||||
|
EXEC SQL SET SQL DIALECT 3;
|
||||||
|
|
||||||
EXEC SQL INCLUDE SQLCA;
|
EXEC SQL INCLUDE SQLCA;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user