Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread "End of Alter Statement" expected - why?
Sat, Dec 9 2023 6:18 AMPermanent Link

Phil Frank

MealService Software

The syntax here appears to be correct:

ALTER TABLE IF EXISTS ASSESSMENTS ADD COLUMN IF NOT EXISTS BMI VARCHAR(3);

but I'm getting an End of Alter Statement expected, instead found 'EXISTS'. I get that message whether I use a valid table name, or not. The syntax is taken directly from the docs. I've typed the statement directly into dbsys, so it can't be an issue of having copied and pasted thereby including any hidden characters.

If I remove the 'IF EXISTS' testing for the existence of the table I get this message:
Left parenthesis expected after IF keyword, instead found NOT in table column.

Any thoughts?

Phil
Sat, Dec 9 2023 6:25 AMPermanent Link

Phil Frank

MealService Software



NEVER MIND!  I'm in the process of upgrading tables, and I was making the mistake of running that in dbsys 3 rather than dbsys 4!
Image