Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Do This SQL
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01055122
Message ID:
01055136
Views:
14
Thank you!

>In VFP9 only
>DELETE MyTable;
>    FROM MyTable;
>    JOIN MyCursor ON MyCursor.Id = MyTable.Id
>
>UPDATE MyTable;
>    SET SomeField = SomeValue;
>    FROM MyTable;
>    JOIN MyCursor ON MyCursor.Id = MyTable.Id
>
>
>>First, I pull some records:
>>
>>
>>SELECT *;
>>  FROM MyTable;
>>  WHERE SomeValue = 1;
>>  INTO CURSOR MyCursor
>>
>>
>>Next, update or delete from original table:
>>
>>
>>
>>  UPDATE MyTable;
>>    SET SomeField = SomeValue;
>>    WHERE Id IN;
>>     (SELECT Id FROM MyCursor)
>>
>>  ** OR
>>
>>  DELETE FROM MyTable;
>>    WHERE Id IN;
>>     (SELECT Id FROM MyCursor)
>>
>>
>>
>>These 2 SQL's are very slow. How can I do thses using joins?
>>
>>Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform