Friday, March 30, 2012

Problem with Check Constraint Validation in MS SQL Server Management Studio Express

Hello,

it seems like the check constraint validation of MS SQL Server Management Studio express is horribly, horribly broken. Either that or I'm using it wrong. I hope it's the latter.

I'm trying to add a check constraint to an empty table. The problem is that just about no form of expression syntax seems to get accepted by MSSQLSMS. On my a table "Projects" I've created a ntext column called "status". The following check constraint expressions have all yielded "Error validating constraint" from MSSQLSMS:
status = "Test"status in ( "One", "Two", "Three" )
I've tried converting the column to regular "text", but that didn't work.
I've tried disabling "check existing data", but that didn't work.
Just about the only thing that got accepted by MSSQLSMS was:
status like 'Test'
... but then MSSQLSMS failed to save the table. What am I doing wrong?sigh, i can't believe this is such an unsolvable problem.

No comments:

Post a Comment