Too easy, Dennis. I just knew there had to be a more complicated way.
ALTER TABLE slsterms ALTER COLUMN jdeslscd TO jdeslscd TEXT (3) Thanks! Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath Sent: Thursday, August 06, 2009 1:18 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Programmatically dropping a NOT NULL constraint ALTER TABLE ALTER COLUMN colname datatype You simply redefine the column without the NOT NULL syntax. Dennis McGrath _____ From: [email protected] [mailto:[email protected]] On Behalf Of Emmitt Dove Sent: Thursday, August 06, 2009 12:14 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Programmatically dropping a NOT NULL constraint I am programming some structure changes that I want to run from a command file. I have a table with a NOT NULL constraint that I need to drop. The column also has a PK. I've figured out how to drop the PK, but the NOT NULL is stumping me. In SYS_CONSTRAINTS the SYS_CONSTRAINT_ID is -784 for the column (an integer value). When I do this: ALTER TABLE slsterms DROP CONSTRAINT -784 I get an error message that reads: -ERROR- Invalid constraint identifier. (2743) Now, for the PK, which was SYS_INDEX_NAME #84 in SYS_INDEXES, I had to do this: SELECT SYS_INDEX_NAME + INTO vndx + FROM SYS_INDEXES + WHERE SYS_COLUMN_NAME = 'jdeslscd' SET VAR vcmd = 'ALTER TABLE slsterms DROP CONSTRAINT'&CTXT(.vndx) &vcmd That worked. But the same approach does not work for the NOT NULL constraint. Any clues? Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected]

