Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use AS with logical expr in SQL Server
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01288504
Message ID:
01288512
Vues:
11
This message has been marked as the solution to the initial question of the thread.
SELECT CAST ( CASE WHEN status = 'A' THEN 1 ELSE 0 END AS bit) AS Rule1
>I have the following SQL Select in VFP application which I need to adopt for SQL Server:
>
>
>select STATUS=A AS RULE1 From MyTable
>
>
>When I pass the above SQL (using SPT) to SQL Server I get error "Incorrect syntax new keyword AS". It must be because SQL Server does not have a logical type and/or it does not support AS.
>
>How can I modify the above SQL Select? RULE1 can have 0 or 1 (not necessarily logical).
>
>Thank you.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform