Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding puzzle 3
Message
De
06/06/2002 05:55:41
 
 
À
06/06/2002 02:58:57
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00665235
Message ID:
00665321
Vues:
24
>How about,
>
>
>SELECT X.un+1, MIN(Y.un)-1 FROM X,X Y ON X.un < Y.un GROUP BY X.un INTO CURSOR Gaps
>
>

Hi Walter, I tried it, although I had to modify your code somewhat. However, the result isn't really an endresult.
create cursor xx ( un i null )
insert into xx values ( 1 )
insert into xx values ( 3 )
insert into xx values ( 4 )
insert into xx values ( 8 )
insert into xx values ( 15 )

SELECT Xx.un+1, MIN(Y.un)-1 FROM Xx inner join  Xx Y on Xx.un < Y.un GROUP BY Xx.un INTO CURSOR Gaps

browse
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform