deletes with rowid

Discussion in 'Meet and Greet' started by rayliner, Apr 4, 2012.

  1. rayliner

    rayliner New Member

    Joined:
    Apr 4, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    i have a fairly complex query that ties in a lto of info from multiple tables to identify specific rows in a single table to delete.I figured the simplest was would be to create a select query that returns the rowid of the rows to be deleted and do something like this:delete from myFile ddwhere dd.rowid in (select d.rowidfrom myFile,myOtherfile where blah,blah)The SELECT by itself works fine, but it won't delete any rows in the statement above. I was able to delete the rows I wanted by running the select, copy/pasting the rowid's from the select into the delete statement (and add quotes and commas), and that worked fine.delete from myFile ddwhere dd.rowid in ('AAANXoAAIAABfK5AAP','AAANXoAAIAABfK5AAG','AAANXoAAIAABfK5AAI','AAANXoAAIAABfK5AAJ')Why wouldn't the delete with the embedded slect work?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice