The first 2 characters of z308_rec_key denote a type e.g. 00 or 01 etc.
The z308_id matches the z303_rec_key.
I wish to return a list of z303_rec_key's where there is no '01' type z308_rec_key.
Seems simple enough in my head...but when I run this query I have to abort. When run, it just sits there for ages and doesnt return any results. The tables are big and I think that the size of these table coupled with the query I have used means that it will take forever and a day to run. [z308 is a table with about 20,000 '01' type rec_key's and so is z303]
Is there any other way I can acheive this?
I use oracle pl/sql but posted here since it seems like a basic sql question...