General information
Category:
Coding, syntax & commands
Title:
SQL Statement questions again !
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only