Re: <No Subject Supplied>
Posted in 1993
> ALTER TABLE rpm_patron ADD CONSTRAINT
> CHECK (co_rol IN (SELECT co_cod FROM rpt_trol) )>
> ERROR 677: Check constraint cannot contain subqueries or procedures
Read the manual a little more closely (7-84 Guide to SQL:Reference)
and you will see that this syntax is not supported within a check
constraint. I believe this syntax is not part of the ANSI standard
and is supposed to be implemented using trigger which are
now available in release 5.01.
>
> ALTER TABLE rpm_patron ADD CONSTRAINT
> (FOREIGN KEY (co_tabremu) REFERENCES dbsai:rpm_0remu)>
> ERROR 295: Referenced and referencing tables have to be in the same database.
>
> According with the Informix-SQL manual, both syntax are supported. If anybody
> knows where the error is or if is there another way to get the same result in
> the second sentence, please let me know it. I will appreciate that.
This is a little more difficult, I believe that this syntax will
eventually be supported within a single Online instance but is
currently disallowed, hence the error message you ran into.
Cheers - Jim
My opinions are my own. They may vary with time but they remain MINE!
----------------------------------------------------------------------
Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM
Company: DHL Systems Inc Phone: (415) 375-5222 (Work)
Address: 700 Airport Blvd. #300 (415) 882-9728 (Home)
Burlingame, CA 94010-1937 Fax: (415) 375-5019
----------------------------------------------------------------------