×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Dang I HATE SQL naming versus system naming.

In system naming I don't have to qualify my constraints in this statement:
CREATE TABLE TESTLIB/ORDLINE (
ORDERNBR INT NOT NULL,
ORDERLINE INT NOT NULL,
ACTIVE CHAR (1 ) NOT NULL,
ITEMNUMBER CHAR (15) NOT NULL,
ORDERQUANTITY DEC (15, 5),
SOMENBR INT NOT NULL,
CONSTRAINT ORDLINE PRIMARY KEY (ORDERNBR, ORDERLINE),
CONSTRAINT OrdlineOrdhead FOREIGN KEY (ORDERNBR)
REFERENCES TESTLIB/ORDHEAD (ORDERNBR),
CONSTRAINT OrdlineItems FOREIGN KEY (ITEMNUMBER)
REFERENCES TESTLIB/ITEMS (ITEMNUMBER),
CONSTRAINT OrdlineActive CHECK (ACTIVE in('0', '1') ),
CONSTRAINT OrdlinePositive CHECK (ORDERLINE > 0)
)

But with SQL naming, if I don't qualify "CONSTRAINT OrdlineOrdhead" as
"CONSTRAINT TESTLIB.OrdlineOrdhead" I get:
SQL5051-Qualifier ROB is not the same as name TESTLIB.
And it is getting ROB from the library owner, not the library name.

So I will try the
SET SCHEMA and try to avoid any library qualification...
...
That seems to work. And is probably the "cleaner" way anyway.

Rob Berendt

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.