Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repeated records
Message
 
 
To
02/08/2007 03:04:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01245292
Message ID:
01245448
Views:
23
>This is the easiest, and probably the best way to do this.
>
>Update yourtable set field1=data1, field2=data2,...;
>  where uniqfield1=uniqdata1 and uniqfield2=uniqdata2 and uniqfield3=uniqdata3
>if _tally=0 && No records found, so this is a new record
>  Insert into yourtable (field1, field2... , uniqfield1, uniqfield2, uniqfield3);
>    data (data1, data2, ... ,uniqdata1, uniqdata2, uniqdata3)
>endif
Looks like a good idea.

What if we work with buffered tables? We may still need a candidate index.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform