Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement