Hi Markus, thank You for Your help! The doublequotes around the names worked fine.
Did I understand it right: The DDL-statement defined the constarint in the right way, but only SQL Studio was unable to show it correctly? kind regards Frank Schimmelpfennig PHILIPS Semiconductors Hamburg ATO-PICTOH IT&DataSupport Tel.: +49 40 5613 -1835, Fax: -3020 "Stausberg, Markus" <markus.stausberg@s To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> ap.com> cc: (bcc: Frank Schimmelpfennig/HBG/SC/PHILIPS) Sent by: Subject: RE: Missing column association after Check Constraint owner-sapdb-general definition @sap-ag.de Classification: 19.11.01 15:35 Hi Frank, > -----Original Message----- > From: [EMAIL PROTECTED] > Sent: Montag, 19. November 2001 11:46 > > I defined a check constraint with following DDL-statement > > ALTER TABLE <Table-Name> ADD CONSTRAINT <Constraint-Name> > CHECK <Column-Name> IN ('Y', 'N') > > When I controlled the results of the operation in SQL Studio > the constraint was set up under the name which was given in > the DDL command (also the predicate and the expression), but > the association of the constraint to the referred column was missing. > > Is there something wrong with my DDL? No, we have a bug in SQL Studio here : Constraints on one(or more) column(s) can be arbitrarily complex in general. Therefore they are stored in the system catalog by their Definitions, as SQL statements. When displaying a constraint, SQL Studio tries to find out the columns involved by looking at doublequoted substrings of such a definition. This heuristics works fine when looking at constraints which are generated by SQL St. itself (because it doublequotes the names (and the constraints it can generate are much more restricted then the general case)). Constraint display will be improved in the next release. Until then you could put doublequotes around the names in your DDL to get the constraints displayed properly. (and keep them as restricted as the constrains SQL St. can generate.) HTH , regards Markus