Login
Products
Sales
Support
Downloads
About
Home
»
Technical Support
»
ElevateDB Technical Support
»
Support Forums
»
ElevateDB SQL
»
View Thread
View Thread
The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Check Constraint using conditionals and multiple fields of the same table.
Fri, Feb 8 2013 6:08 AM
Permanent Link
Vitor Martins
Pregitzer & Ca., Lda
Example:
Table: Test
Fields: RequiredData BOOL and DefaultData INT
Write a Constraint check for verify:
If FieldRequiredData = True Then DefaultData cannot be NULL.
Vitor Martins
Fri, Feb 8 2013 8:15 AM
Permanent Link
Roy Lambert
NLH Associates
Team Elevate
Vitor
ALTER TABLE "Test"
ADD CONSTRAINT "TEST" CHECK ((FieldRequiredData = FALSE) OR (DefaultData IS NOT NULL))
I think if I understand your post correctly
Roy Lambert [Team Elevate]