Subject | stored proc and default values |
---|---|
Author | blescouet |
Post date | 2004-07-07T09:34:57Z |
Hi all,
With FB 1.0.3, I have a table like that :
CREATE TABLE CONVIVE (
CNVIDP INTEGER NOT NULL,
CNVMATA VARCHAR(20),
...
CNVTICKETL LOGIQUE default 1 NOT NULL,
);
LOGIQUE is a domain :
CREATE DOMAIN LOGIQUE AS
SMALLINT
CHECK (value in (0,1) or value is null);
When I'm inserting a new record into CONVIVE, without giving a value
for CNVTICKETK, there's no problem, the record is inserted with
CNVTICKETL=1. But, when using the same insert command into a stored
procedure, I have a SQL Error :
- The insert failed because a column definition includes validation
constraints.
validation error for column CNVTICKETL, value "*** null ***
Why did not FB affect 1 to CNVTICKETL ? FB bug or did I misunderstood
FB behaviors ?
B.L.
With FB 1.0.3, I have a table like that :
CREATE TABLE CONVIVE (
CNVIDP INTEGER NOT NULL,
CNVMATA VARCHAR(20),
...
CNVTICKETL LOGIQUE default 1 NOT NULL,
);
LOGIQUE is a domain :
CREATE DOMAIN LOGIQUE AS
SMALLINT
CHECK (value in (0,1) or value is null);
When I'm inserting a new record into CONVIVE, without giving a value
for CNVTICKETK, there's no problem, the record is inserted with
CNVTICKETL=1. But, when using the same insert command into a stored
procedure, I have a SQL Error :
- The insert failed because a column definition includes validation
constraints.
validation error for column CNVTICKETL, value "*** null ***
Why did not FB affect 1 to CNVTICKETL ? FB bug or did I misunderstood
FB behaviors ?
B.L.