Subject | Dropping a field problem |
---|---|
Author | deschenes_jacques |
Post date | 2005-05-11T19:11:28Z |
Hi!
I'm running Firebird 1.03 on an HP-UX server.
When I try to drop the field NBR_OCCUR_RESERVA from the table
RESERVA, I get the error 'there are 1 dependencies':
SQL> show table reserva;
NO_RESERVA INTEGER Not Null
NO_TYPE_RESERVA INTEGER Not Null
DATE_D_RESERVA TIMESTAMP Not Null
DATE_F_RESERVA TIMESTAMP Not Null
HRS_D_RESERVA CHAR(4) Not Null
HRS_F_RESERVA CHAR(4) Not Null
NO_TYPE_LOC_DEM INTEGER Nullable
NO_GR_LOC_DEM INTEGER Nullable
NO_BATIMENT_DEM INTEGER Nullable
NO_ETAGE_DEM INTEGER Nullable
NO_LOC_DEM VARCHAR(10) Nullable
NO_ETA_RESERVA INTEGER Not Null
NO_BATIMENT_ATTRIB INTEGER Nullable
NO_ETAGE_ATTRIB INTEGER Nullable
NO_LOC_ATTRIB VARCHAR(10) Nullable
NO_UTILI_REQUERANT INTEGER Nullable
INFO_REQUERANT VARCHAR(200) Nullable
COURRIEL_REQUERANT VARCHAR(200) Nullable
NO_SEQ_ACT INTEGER Not Null
COMMENT_GESTION VARCHAR(2000) Nullable
COMMENT_REQUERANT VARCHAR(2000) Nullable
NO_PERIODE_RESERVA INTEGER Not Null
NO_SEM_RESERVA INTEGER Nullable
IND_JR_OUVRABLE (IND_OUI) CHAR(1) Not Null
default 'O'
check (value in ('O','N'))
IND_LUNDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_MARDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_MERCREDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_JEUDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_VENDREDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_SAMEDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_DIMANCHE (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
NO_UTILI_DERN_MODIF INTEGER Not Null
NBR_PLACE_DEM SMALLINT Nullable default 0
NBR_OCCUR_RESERVA SMALLINT Nullable
FREQUENCE_RESERVA SMALLINT Nullable
CONSTRAINT FK_RESERVA_B_DEM:
Foreign key (NO_BATIMENT_DEM) References BATIMENT (NO_BATIMENT)
CONSTRAINT FK_RESERVA_E_DEM:
Foreign key (NO_ETAGE_DEM) References ETAGE (NO_ETAGE)
CONSTRAINT FK_RESERVA_L_ATTRIB:
Foreign key (NO_BATIMENT_ATTRIB, NO_ETAGE_ATTRIB,
NO_LOC_ATTRIB) References LOC (NO_BATIMENT, NO_ETAGE, NO_LOC)
CONSTRAINT FK_RESERVA_TER:
Foreign key (NO_ETA_RESERVA) References TAB_ETA_RESERVA
(NO_ETA_RESERVA)
CONSTRAINT FK_RESERVA_TGL:
Foreign key (NO_GR_LOC_DEM) References TAB_GR_LOC (NO_GR_LOC)
CONSTRAINT FK_RESERVA_TPR:
Foreign key (NO_PERIODE_RESERVA) References TAB_PERIODE_RESERVA
(NO_PERIODE_RESERVA)
CONSTRAINT FK_RESERVA_TSR:
Foreign key (NO_SEM_RESERVA) References TAB_SEM_RESERVA
(NO_SEM_RESERVA)
CONSTRAINT FK_RESERVA_TTL:
Foreign key (NO_TYPE_LOC_DEM) References TAB_TYPE_LOC
(NO_TYPE_LOC)
CONSTRAINT FK_RESERVA_TTR:
Foreign key (NO_TYPE_RESERVA) References TAB_TYPE_RESERVA
(NO_TYPE_RESERVA)
CONSTRAINT FK_RESERVA_U_DERN_MODIF:
Foreign key (NO_UTILI_DERN_MODIF) References UTILI (NO_UTILI)
CONSTRAINT FK_RESERVA_U_REQUERANT:
Foreign key (NO_UTILI_REQUERANT) References UTILI (NO_UTILI)
CONSTRAINT PK_RESERVA:
Primary key (NO_RESERVA)
The RDB$DEPENDENCIES for that field is:
SQL> select * from rdb$dependencies where
rdb$field_name='NBR_OCCUR_RESERVA';
RDB$DEPENDENT_NAME RDB$DEPENDED_ON_NAME
RDB$FIELD_NAME RDB$DEPENDENT_TYPE
RDB$DEPENDED_ON_TYPE
=============================== ===============================
=============================== ==================
====================
DB$115 RESERVA
NBR_OCCUR_RESERVA
2 0
DB$115 RESERVA
NBR_OCCUR_RESERVA
2 0
I don't know what is that dependent_name 'DB$115'. Can anyone tell
me ?
Thanks!
Jacques
I'm running Firebird 1.03 on an HP-UX server.
When I try to drop the field NBR_OCCUR_RESERVA from the table
RESERVA, I get the error 'there are 1 dependencies':
SQL> show table reserva;
NO_RESERVA INTEGER Not Null
NO_TYPE_RESERVA INTEGER Not Null
DATE_D_RESERVA TIMESTAMP Not Null
DATE_F_RESERVA TIMESTAMP Not Null
HRS_D_RESERVA CHAR(4) Not Null
HRS_F_RESERVA CHAR(4) Not Null
NO_TYPE_LOC_DEM INTEGER Nullable
NO_GR_LOC_DEM INTEGER Nullable
NO_BATIMENT_DEM INTEGER Nullable
NO_ETAGE_DEM INTEGER Nullable
NO_LOC_DEM VARCHAR(10) Nullable
NO_ETA_RESERVA INTEGER Not Null
NO_BATIMENT_ATTRIB INTEGER Nullable
NO_ETAGE_ATTRIB INTEGER Nullable
NO_LOC_ATTRIB VARCHAR(10) Nullable
NO_UTILI_REQUERANT INTEGER Nullable
INFO_REQUERANT VARCHAR(200) Nullable
COURRIEL_REQUERANT VARCHAR(200) Nullable
NO_SEQ_ACT INTEGER Not Null
COMMENT_GESTION VARCHAR(2000) Nullable
COMMENT_REQUERANT VARCHAR(2000) Nullable
NO_PERIODE_RESERVA INTEGER Not Null
NO_SEM_RESERVA INTEGER Nullable
IND_JR_OUVRABLE (IND_OUI) CHAR(1) Not Null
default 'O'
check (value in ('O','N'))
IND_LUNDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_MARDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_MERCREDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_JEUDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_VENDREDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_SAMEDI (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
IND_DIMANCHE (IND_NON) CHAR(1) Not Null
default 'N'
check (value in ('O','N'))
NO_UTILI_DERN_MODIF INTEGER Not Null
NBR_PLACE_DEM SMALLINT Nullable default 0
NBR_OCCUR_RESERVA SMALLINT Nullable
FREQUENCE_RESERVA SMALLINT Nullable
CONSTRAINT FK_RESERVA_B_DEM:
Foreign key (NO_BATIMENT_DEM) References BATIMENT (NO_BATIMENT)
CONSTRAINT FK_RESERVA_E_DEM:
Foreign key (NO_ETAGE_DEM) References ETAGE (NO_ETAGE)
CONSTRAINT FK_RESERVA_L_ATTRIB:
Foreign key (NO_BATIMENT_ATTRIB, NO_ETAGE_ATTRIB,
NO_LOC_ATTRIB) References LOC (NO_BATIMENT, NO_ETAGE, NO_LOC)
CONSTRAINT FK_RESERVA_TER:
Foreign key (NO_ETA_RESERVA) References TAB_ETA_RESERVA
(NO_ETA_RESERVA)
CONSTRAINT FK_RESERVA_TGL:
Foreign key (NO_GR_LOC_DEM) References TAB_GR_LOC (NO_GR_LOC)
CONSTRAINT FK_RESERVA_TPR:
Foreign key (NO_PERIODE_RESERVA) References TAB_PERIODE_RESERVA
(NO_PERIODE_RESERVA)
CONSTRAINT FK_RESERVA_TSR:
Foreign key (NO_SEM_RESERVA) References TAB_SEM_RESERVA
(NO_SEM_RESERVA)
CONSTRAINT FK_RESERVA_TTL:
Foreign key (NO_TYPE_LOC_DEM) References TAB_TYPE_LOC
(NO_TYPE_LOC)
CONSTRAINT FK_RESERVA_TTR:
Foreign key (NO_TYPE_RESERVA) References TAB_TYPE_RESERVA
(NO_TYPE_RESERVA)
CONSTRAINT FK_RESERVA_U_DERN_MODIF:
Foreign key (NO_UTILI_DERN_MODIF) References UTILI (NO_UTILI)
CONSTRAINT FK_RESERVA_U_REQUERANT:
Foreign key (NO_UTILI_REQUERANT) References UTILI (NO_UTILI)
CONSTRAINT PK_RESERVA:
Primary key (NO_RESERVA)
The RDB$DEPENDENCIES for that field is:
SQL> select * from rdb$dependencies where
rdb$field_name='NBR_OCCUR_RESERVA';
RDB$DEPENDENT_NAME RDB$DEPENDED_ON_NAME
RDB$FIELD_NAME RDB$DEPENDENT_TYPE
RDB$DEPENDED_ON_TYPE
=============================== ===============================
=============================== ==================
====================
DB$115 RESERVA
NBR_OCCUR_RESERVA
2 0
DB$115 RESERVA
NBR_OCCUR_RESERVA
2 0
I don't know what is that dependent_name 'DB$115'. Can anyone tell
me ?
Thanks!
Jacques