Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mutually exclusive
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01321368
Message ID:
01321613
Vues:
15
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform