James, I will look at my code to see if I can implement your suggestion. Many thanks.
Bill Eyring -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of James Bentley Sent: Wednesday, January 07, 2009 6:52 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Syntax Question Bill, If you have data in the table and are attempting to add the NOT NULL constraint the proper syntax is: alter table dedcodes ALTER column `GLCode` TEXT (16) NOT NULL ('You Must Enter a GL Code !') Note when you are changing the column definition of an existing column you must use the ALTER key word not the ADD keyword in position 4 of the statement. Also see Razzak's comments re determining if all rows meet the new constraint condition. Jim Bentley American Celiac Society [email protected] tel: 1-504-737-3293 ----- Original Message ---- From: Bill Eyring <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Wednesday, January 7, 2009 5:07:31 PM Subject: [RBASE-L] - RE: Syntax Question Dan & Razzak Thanks for the help. I thought the syntax was correct ! The idquotes are set to [`]. Dan you're right there is data in the table. I don't use this particular command very often but it sure helps to have friends on the Rlist ! Many thanks..this list is terrific ! Bill Eyring -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dan Goldberg Sent: Wednesday, January 07, 2009 5:49 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Syntax Question Try this: alter table dedcodes add GLCode TEXT 16 NOT NULL ('You Must Enter a GL Code !') Remember, the NOT NULL part will not work if the table contains rows. Dan Goldberg -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Bill Eyring Sent: Wednesday, January 07, 2009 2:41 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Syntax Question I want to add a column to a table and I've tried many permutations of the same command. The command is alter table dedcodes add column `GLCode` TEXT (16) NOT NULL ('You Must Enter a GL Code !') I keep getting an invalid message -ERROR- Invalid column constraint(2794) Can anyone tell me what's wrong with this syntax, I followed the syntax in RBase Help. I am using latest release of Turbo 8- 8.0.19.31229 Thanks, Bill Eyring

