Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
tech_1
Posting Yak Master
129 Posts |
Posted - 2011-12-08 : 15:42:38
|
| Is it possible to have a constraint of some kind where:Either ID must be populated OR2 other fields must be populatedBUT all 3 fields cannot have values populated togetherthanks |
|
|
tech_1
Posting Yak Master
129 Posts |
Posted - 2011-12-08 : 16:11:16
|
| ([ID] IS NULL AND [Field1] IS NOT NULL AND [Field2] IS NOT NULL OR [ID] IS NOT NULL AND [Field1] IS NULL AND [Field2] IS NULL) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-09 : 00:27:43
|
| put a check constraint on table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|