Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Best way on Updating a SQL file
Hi everyone,
I have been having trouble updating a SQL table with RV. I have a table Myfoo with and index and it seems to talk a while here what I have:
Index is currently on Myitem, and I think I need to have on Myorder as well.
SELECT Myfoo
REPLACE ALL status WITH "4" FOR orderno = lc_Myorderno
=tableupdate(.t.)
REQUERY()
This will be really slow on a large file.
I was thinking on using a SCAN ENDSCAN with a new index setup for Myfoo, on ORDERNO.
lc_MyfooOrder = lc_myorderno
SELECT Myfoo
REQUERY()
SCAN WHILE orderno = lc_Myorderno
REPLACE status WITH "4"
=tableupdate(.t.)
ENDSCAN
REQUERY()
Im I on the right path here? BTW, having touble highligting the code to so you can visually see that that it is code. I still learning my way around UT.
Any help is greatly appreciated.
Craig
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