× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Got it! If you do enough iterations, you're bound to stumble across it
sooner or later.

An ALTER TABLE statement adding multiple constraints needs the word ADD in
front of each. An ALTER TABLE adding a single constraint does not.

ALTER TABLE JEFF/newfile
PRIMARY KEY ( ITNBR ) ;

ALTER TABLE JEFF/newfile
ADD CONSTRAINT nxRcdCd CHECK (RCDCD = 'MB')
ADD CONSTRAINT nxActRec CHECK (ACREC IN ('A','D','S'))
ADD CONSTRAINT nxCwtCod CHECK (CWTCD IN ('C','N'))
ADD CONSTRAINT nxVndNbr CHECK (VNDNR > 0)
ADD CONSTRAINT nxItmDsc CHECK (ITDSC <> ' ')
ADD CONSTRAINT nxPack CHECK (PACKX > 0)
ADD CONSTRAINT nxSize CHECK (SIZEX <> ' ')
ADD CONSTRAINT nxCasDsc CHECK (QSUN1 <> ' ')
ADD CONSTRAINT nxCasSub CHECK (CASSB IN (' ','C'))
ADD CONSTRAINT nxPallet CHECK (PALET IN (' ','N','L','S'))
ADD CONSTRAINT nxSpcOrdItm CHECK (BCKCD IN ('Y','N'))
ADD CONSTRAINT nxDolPct CHECK (PCECD IN ('P','D'))
ADD CONSTRAINT nxTaxCd1 CHECK (TAXC1 IN ('T','N'))
ADD CONSTRAINT nxInStock CHECK (INSTK IN ('Y','N'))
ADD CONSTRAINT nxPortions CHECK (PRTNS > 0)
ADD CONSTRAINT nxNonFood CHECK (NFDCD >= 1 and NFDCD <= 3)
ADD CONSTRAINT nxUntCd CHECK (UNITCD >= '1' and UNITCD <= '4')
ADD CONSTRAINT nxDatPrdCd CHECK (PRCOD IN ('N','M','O'))
;

ALTER TABLE JEFF/newfile
CONSTRAINT nxPrcBkSeqUK UNIQUE (MBGROP , MBSBGP , MBLINE) ;

ALTER TABLE JEFF/newfile
CONSTRAINT nxWhsFK FOREIGN KEY (DFTWH)
REFERENCES WRHSEMST (WHNO)
On Delete Restrict
On Update Restrict ;

ALTER TABLE JEFF/newfile
CONSTRAINT nxCatalogFK FOREIGN KEY (CATCD1)
REFERENCES DMCATMST (CTCODE)
On Delete Restrict
On Update Restrict ;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.