proper method for testing for a value in a column on a table
Hello, I've been a programmer of many years but this is my first time with PL/SQL so please excuse the naivety of my question.
In an "INSTEAD OF" trigger on a view I'm trying to test a column in a different table for the existence of a value and then based on that result I'll insert the data in one table or another. This seems to me to be a trivial task but the only way I've found to do this is to "select into" on the table and then catch the resulting exception. This works but it's a kludge, and it really falls apart with compound decisions - especially if NO_DATA_FOUND is the true condition.
So my question is; what is the correct way to do this? I know I'm missing something fundamental here, but to me it seems it should be a simple as "if A exists in B.C then ..."
Thanks for any help you can offer,
Matt