Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Import Table
Message
De
03/07/1999 08:50:54
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
02/07/1999 23:38:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00237128
Message ID:
00237161
Vues:
17
Hi, John:

I agree with Sara King's comment on your other thread, that usually importing a record takes a bit more checking than you can get with a one-line SQL statement...but that's just my experience. May I suggest that you consider something like the following (rough code, only :):
SELECT sourcetable
SCAN
  IF SEEK( 'sourcetable.id', 'targettable')
    SCATTER NAME oData
    *!* Then do some checking maybe to see if it really is more up-to-date
    SELECT TargetTable
    GATHER NAME oData
  ELSE
   APPEND BLANK IN TargetTable
   *!* initialize the fields
  ENDIF
ENDSCAN
> I am writting a program that import data from source table to my target table. There may has the same records in both table however the data in source table are more updated. If I use APPEND FROM command to import, there may has error for duplicate key.
> Any method to solve it using SQL statement?
>
>Thank you
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform