[SQL] Something I'd like to try...

2000-06-09 Thread Niall Smart
test can become E.EMPLOYEE_ID = UU.EMPLOYEE_ID Do the guru's think that this would be hard to add? Also, is it desirable? -- Niall Smart email: [EMAIL PROTECTED] phone: (087) 8052390

Re: [SQL] Problem with subquery in CHECK constraint.

2000-06-09 Thread Niall Smart
Hiroshi Inoue wrote: > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > > Behalf Of Niall Smart > > > > CONSTRAINT TYPE_CD_OK CHECK ( > > EXISTS (SELECT 1 FROM XREF WHERE > > XREF_GROUP = 'CUST_TYPE' A

Re: [SQL] ORDER BY in definition of views

2000-06-08 Thread Niall Smart
Michael Ansley wrote: > > Would there be a particular reason to do this? > I like to define views for lookups (i.e. job titles, departments, accounts, whatever). It would be nice if I could just do a select * from whatever_vw instead of having to remember to put the order by whatever_name cla

[SQL] ORDER BY in definition of views

2000-06-08 Thread Niall Smart
Guys, Does anyone know if this is on the radar for 7.1? Niall -- Niall Smart email: [EMAIL PROTECTED] phone: (087) 8052390

Re: [SQL] Problem with subquery in CHECK constraint.

2000-06-08 Thread Niall Smart
CONSTRAINT TYPE_CD_OK CHECK ( EXISTS (SELECT 1 FROM XREF WHERE XREF_GROUP = 'CUST_TYPE' AND XREF_CD = TYPE_CD) ) > There seems to be more serious problems. > 1) The constraint is not only for the defined table but also for referenced >

[SQL] Problem with subquery in CHECK constraint.

2000-06-07 Thread Niall Smart
27;, 'POT'); DROP TABLE CUST; CREATE TABLE CUST ( CUST_ID INTEGER NOT NULL, NAMEVARCHAR(64) NOT NULL, TYPE_CD VARCHAR(8) NOT NULL, CONSTRAINT CUST_PK PRIMARY KEY (CUST_ID), CONSTRAINT TYPE_CD_OK CHECK (VALID_XREF('CUST_TYPE', TYPE_CD)) ); INSERT INTO CUST VALUES (1, 'Joe Bloggs', 'ACTIV'); INSERT INTO CUST VALUES (2, 'Jim Smith', 'foo'); -- Niall Smart email: [EMAIL PROTECTED] phone: (087) 8052390