Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement questions again !
Message
De
01/01/2001 20:52:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Statement questions again !
Divers
Thread ID:
00458353
Message ID:
00458353
Vues:
58
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
Fil
Voir

Click here to load this message in the networking platform