Subject | Error on Inserting Record to Table? |
---|---|
Author | Joaquim Macedo |
Post date | 2003-03-05T14:58:15Z |
Hi all!
I'm trying to convert a MS Access database to a Firebird one.
At this moment, I have scripts to create database and tables, to
insert records on the tables, to create Foreign Keys.
Please consider the following table:
-----------------------------------------------------------------
CREATE TABLE ASS_COBRA (
ENT_GER_RELAC_CODIG VARCHAR( 8 ) NOT NULL
, ENT_ENTID_RELAC_CODIG_ESPEC INTEGER NOT NULL
, DATA_INICI TIMESTAMP NOT NULL
, ENT_GER_RELAC_CODIG_COBRA VARCHAR( 8 )
, ENT_ENTID_RELAC_CODIG_ESPEC_COB INTEGER
, CONSTRAINT PK_ASS_COBRA
PRIMARY KEY ( ENT_GER_RELAC_CODIG, ENT_ENTID_RELAC_CODIG_ESPEC,
DATA_INICI )
)
-----------------------------------------------------------------
When inserting the record:
-----------------------------------------------------------------
INSERT INTO ASS_cobra (
data_inici,
ENT_entid_relac_codig_espec,
ENT_entid_relac_codig_espec_cob,
ENT_GER_relac_codig,
ENT_GER_relac_codig_cobra
) VALUES (
'22-01-1990',
3,
3,
'ASSOC',
'COBR'
);
-----------------------------------------------------------------
I get this error message:
-----------------------------------------------------------------
SQL ERROR CODE:-413
SQL ERROR MESSAGE:
Overflow occurred during data type conversion.
-----------------------------------------------------------------
On IB_SQL I get:
conversion error from string "22-01-1990"
Why can I insert some records to this table, and this don't?
Thanks in advance.
Best regards,
Joaquim.
I'm trying to convert a MS Access database to a Firebird one.
At this moment, I have scripts to create database and tables, to
insert records on the tables, to create Foreign Keys.
Please consider the following table:
-----------------------------------------------------------------
CREATE TABLE ASS_COBRA (
ENT_GER_RELAC_CODIG VARCHAR( 8 ) NOT NULL
, ENT_ENTID_RELAC_CODIG_ESPEC INTEGER NOT NULL
, DATA_INICI TIMESTAMP NOT NULL
, ENT_GER_RELAC_CODIG_COBRA VARCHAR( 8 )
, ENT_ENTID_RELAC_CODIG_ESPEC_COB INTEGER
, CONSTRAINT PK_ASS_COBRA
PRIMARY KEY ( ENT_GER_RELAC_CODIG, ENT_ENTID_RELAC_CODIG_ESPEC,
DATA_INICI )
)
-----------------------------------------------------------------
When inserting the record:
-----------------------------------------------------------------
INSERT INTO ASS_cobra (
data_inici,
ENT_entid_relac_codig_espec,
ENT_entid_relac_codig_espec_cob,
ENT_GER_relac_codig,
ENT_GER_relac_codig_cobra
) VALUES (
'22-01-1990',
3,
3,
'ASSOC',
'COBR'
);
-----------------------------------------------------------------
I get this error message:
-----------------------------------------------------------------
SQL ERROR CODE:-413
SQL ERROR MESSAGE:
Overflow occurred during data type conversion.
-----------------------------------------------------------------
On IB_SQL I get:
conversion error from string "22-01-1990"
Why can I insert some records to this table, and this don't?
Thanks in advance.
Best regards,
Joaquim.