I need to come up with a query where I can remove records that match a
certain condition.

 

I have file auditing data and I need the query to show all the files that
were deleted and the files that were renamed but not the files that was
deleted AND renamed TO.  Problem is the Delete is one record and the Rename
is another one.

 

For example, in the sample table below, I want records 3 and 4, since A was
deleted (record 1) AND renamed to (record 2)

 

ID            Filename             operation            RenamedTo

1              A                             Deleted                

2              B                             Renamed            A

3              C                             Renamed            D

4              E                              Deleted

 

I tried to use an except, but that won't work since the data won't match up
between the records.  Record 1 and 2 don't match. 

 

Due to a limitation in my program, I have to do this in a single select
statement.

 

Any advice would be wonderful!

 

Thanks,

 

Gene

 

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to