Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional update syntax
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01376414
Message ID:
01376421
Vues:
11
Thanks Sergey (I did notice that when I tried to run my script after changing to real field names).

>Almost. SQL Server doesn't have logical data type. The bit data type is numeric.
>
>
>UPDATE [MyTable]
>SET [Field1] = @Field1,
>        [Field2] = @Field2,
>        [Field3] = CASE WHEN [Field4] = 1 THEN [Field3] ELSE @Field3 END
>
>
>
>>
>>
>>UPDATE [MyTable]
>>SET [Field1] = @Field1,
>>        [Field2] = @Field2,
>>        [Field3] = CASE WHEN [Field4] THEN [Field3] ELSE @Field3 END
>>
>>
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform