Re: Problem with Illustra
Posted in 1996
I haven't seen nor used Illustra or any manuals, but it ought to be possible to write something like: foreign key(fil_naz[]) references table_a (cod_naz) or whatever is the syntax to reference an element of the fil_naz-array without the actual element given. This would at least make the datatypes the same, and the engine should be smart enough to understand that every element of this array should exist in table_a.cod_naz If this is not the case you might be able to write some kind of triggers/stored procedures that do the checking. minoja@cilea.it (Bruno Minoja) wrote: : Dear Sirs, : We would be grateful if You could solve this problem. : : We have created a table as follows : : create table table_a : ( : cod_naz varchar(2) not null : , des_naz varchar(30) : , primary key(cod_naz) : ); : : And another onec ontaing a column defined as a arrayof as follows : : create table table_b : ( : fil_naz arrayof(varchar(2)) : ,foreign key(fil_naz) references table_a (cod_naz) : ); : : Now we try to enforce a integrity contraint on a generic element of : array whose value should be configured in the column cod_naz of : table_a . : : Creating table_b we obtain obviously this error : : create table: referenced data type mismatch for column cod_naz : Anyone know if there is a way to for a correct definition. : Many Ragards Bruno Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org