Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace for item_id in another table
Message
 
To
16/04/1999 12:38:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00209054
Message ID:
00209064
Views:
27
Denise,

You're so close! :) You need to use the SQL delete command, not the traditional VFP delete. To do this, just use WHERE instead of FOR:
delete WHERE item_id in (select item_id from OtherTable)
>We're trying to get a particular office's data out of our main database. I can easily pull all their data into another table with a sql statement. Then what I'd like to do is:
>
>select MainTable
>delete for item_id in (select item_id from OtherTable)
>
>But apparently that doesn't work.
>
>My backup plan is a loop but I was wondering if there's a sql way to do it. Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform