Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement questions again !
Message
From
01/01/2001 20:52:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQL Statement questions again !
Miscellaneous
Thread ID:
00458353
Message ID:
00458353
Views:
56
hi,
I have a table and a grid which is populating into cursor.
I want to save/update the cursor records into the table. And since the cursor records is filter out from the table, i will add, modify or delete the records in the cursor. Now the added, modified or deleted record need to update into the table. That may have new record add in, record modify or record to be delete. How to do it in sql statement ?
Below is my code which got problems :

select Invoice &&table
go top
scan
select temptable &&cursor
locate for temptable.invoice_no=invoice.invoice_no
if found()
replace invoice.invoice_no with temptable.invoice_no
else
delete
endif
endscan

Code above can't locate the record, only will delete the record and didn't add in new record.

thanks

regards,
kengwen
Next
Reply
Map
View

Click here to load this message in the networking platform