Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import Table
Message
From
03/07/1999 08:50:54
 
 
To
02/07/1999 23:38:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00237128
Message ID:
00237161
Views:
16
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
Previous
Reply
Map
View

Click here to load this message in the networking platform