Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are There Any Simple For This?
Message
De
18/07/2001 10:36:55
 
 
À
18/07/2001 07:44:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00531899
Message ID:
00531995
Vues:
12
Hi Sanjay,

Just FYI, you can edit a message after you have posted it (recent addition) so you can avoid this double posting stuff (I hate it when that happens!)

Also.. Bit of a sledgehammer to crack a nut don't you think? see my post to Cetin.

>Of course you can open 2 tables or more at the same time. Use SQL statements in your loop thus;
>
>Create Cursor MyCursor (yourfieldname1 type precision, ...)
>ADIR(FileList, 'SmallTable_*.dbf')
>
>*-- ALEN() will give you the row count of the array fileList
>For x=1 to ALEN(FileList,1)
>*-- Open the table in an unused work area
>  USE FileList[x,1] IN 0
>
>*-- Extract your data
>  SELECT yourFields
>  FROM (FileList[x,1])
>  WHERE yourSelectCondition
>  INTO ARRAY dataArray
>
>*-- Insert the data into the Cursor
>  INSERT INTO DBF('MyCursor') FROM ARRAY dataArray
>
>*-- Close files and clean up
>  USE IN (FileList[x,1])
>  RELEASE dataArray
>Endfor
>
>
>
>Regarding the sort order, you could sort MyCursor after all inserts are finished. You will not be able to sort while inserts are going on since you cannot 'insert before' a record.
>
>Cheers
Will Jones
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform