General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
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
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