Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Hey Hilmar,
Thanks for you reply. I just found your reply to another post. I will try that.
Aloha,
James
>>Hi All,
>>
>>Is there a way to put into a SQL - Select statement a number that increments by 1 and resets at when a value changes? For instance an incrementing number that resets at each zip code.
>>
>>Aloha,
>>
>>James
>
>In principle no, because you have no control in which order the records will be processed. However, if you do a first SELECT into a cursor (with the NOFILTER clause), then it is likely that SELECTing from this cursor will process the records in order. In this case, I would create a UDF, which accepts the key field as a parameter, increments a global variable or a value in a table, and resets when the value changes.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement