>Thanks, Mark. Still a kludge, but perhaps better than the one I was using because it was causing a full table scan.
>
>I'd still like to know how to do this with conditional logic. However, it may be a moot point for my immediate purposes because I'm thinking of switching to the Oracle driver where I can use the kinder, gentler way of returning cursors. In that version, based on an example you sent me, the SELECT statement appears (with OPEN MyCursor FOR) inside the BEGIN...END block, where I should be able to use conditional logic.
That would be correct. The following should work:
BEGIN
If nKey is null then
open cursor...;
Else
open cursor...;
End If;
END;
END;
/
Mark McCasland
Midlothian, TX USA