1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

deletes with rowid

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

  1. rayliner

    rayliner New Member

    Apr 4, 2012
    Likes Received:
    Trophy Points:
    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