Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mutually exclusive
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01321368
Message ID:
01321613
Views:
14
>>Hi everybody,
>>
>>How can I make two bit fields to be mutually exclusive? E.g. I have Approved and OnHold fields and if OnHold = 1 Approved should be 0. If OnHold = 0 Approved still can be 0.
>>
>>Thanks a lot in advance.
>
>And why you need TWO fields for ONE status?
>Why not one tinyint:
>
>0 - No processed yet.
>1 - On Hold
>2 - Approved

I was also thinking about that because right now it's a bit complex to manage. Originally there was a requirement to have Approved field. I already created an interface for this. Yesterday the manager suggested to add two new fields (as it is that easy) and make all the changes in the interface too. So, I created the script and started to code interface changes at home (I didn't install Visual Studio at home, so I'm doing it in Wordpad), but then started to think it may be more complex.

Let me re-discuss the option of just one field.

Thanks a lot again.

UPDATE. Yes, we just agreed on one character field. Now, back to making a new table script :)
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform