Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Counter
Message
De
29/08/2000 21:17:08
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00410576
Message ID:
00410579
Vues:
17
Hi Michael,

I think you're after:

SELECT SUM(IIF(x > 3,1,0)) AS counter FROM table1

Gavin...

>I'm trying to increment a counter in a SQL statement based on a condition. I've seen the code before somewhere, but I can't find it. It's something like this:
>
>select max(iif(x>3,1,0),1) as counter ;
> from table1
>
>
>
>This code isn't right, far from it, but there was someway to increment the "counter" that I can't remember. Does anyone have any idea what I'm talking about?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform