Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you nest CASE statements in SPT for SQL 7
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00258343
Message ID:
00258790
Vues:
9
I tried several versions in SQL Server Query Analyzer, but couldn't get any to work. I tried:

CASE field1
WHEN 'A' THEN
CASE field2
WHEN 0 THEN field3*(field4/100)
ELSE field3*(field5/100) END AS amt_paid
ELSE CASE field6
WHEN 0 THEN field3*(field7/100)
ELSE field3*(field7/100) END AS amt_paid

to no avail. Couldn't get it to work, so I created a cursor and solved it using several steps.

If you have any ideas, let me know.

Thanks,
Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform