Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Check Constraint using conditionals and multiple fields of the same table.
Fri, Feb 8 2013 6:08 AMPermanent 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 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate 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]
Image