How to delete based on rowid?

Answer:

It works ok when i try it (or prehaps i missed something)

SQL> create table foo (test varchar2(10));

Table created.

SQL> insert into foo values ('123');

1 row created.

SQL> insert into foo values ('456');

1 row created.

SQL> commit;

Commit complete.

SQL> create table foo2 (rowid_col varchar2(20));

Table created.

SQL> insert into foo2 select rowid from foo;

2 rows created.

SQL> commit;

Commit complete.

SQL> select * from foo2;

ROWID_COL
--------------------
AAAAsEAACAAAAUmAAA
AAAAsEAACAAAAUmAAB

SQL> delete from foo where rowid in (select rowid_col from foo2);

2 rows deleted.

Question:

<[email protected]> wrote in message
news:[email protected]...
>
>
> G'day,
>
> I wish to delete from a table using a list of rowid's stored in another
> table.
>
> Can someone give me some pointers on this as whenever i do something
> like:
>
> delete from surf where rowid in (select surf_rowid from
> surf_rows_to_delete);
>
> I get a strange ora-01578 msg as the db is fit and healthy.
>
> cheers
>
> Marc
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
 

Hosted by www.Geocities.ws

1