Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Division to columns
Message
De
28/09/2005 07:43:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/09/2005 06:31:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01053818
Message ID:
01053844
Vues:
15
>Hi
>Help please:
>I have a cursor with 10 lines:
>for example:
>
create cursor crsr1(id i)
>for i=1 to 10
>insert into crsr1value(i)
>endfor
>Now, I have another cursor with three columns
>for example:
>
create cursor crsr2(a c(1),b c(1),c c(1))
>
>I want to divide the values of the first cursor inside the second like this:
>A B C
>1 2 3
>4 5 6
>7 8 9
>10
>
>How can I do it?
Local Array aTrans[1]
Local ix
Select Padl(Id,2,'0') From crsr1 Into Array aTrans
Dimension aTrans[Ceiling(Alen(aTrans)/3),3]
For ix=_Tally+1 To Alen(aTrans)
  aTrans[m.ix]=''
EndFor

Insert into crsr2 from Array aTrans
PS: Depending on version arrays have a limti of 65000 elements. Over 65000 rows case is not handled here.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform