Exactly what was your problem? If you just need to select just do a select (as I've described in previous mail), but if you have a lot of parameters (p_cdX) and don't like to type/copy&paste sql subqueries, just create simple loop to generate query and do "execute immediate query returning into p_key"? Or maybe you need to describe your problem more specific. On 9/29/05, Edgar Chupit <chupit@xxxxxxxxx> wrote: > Why not implement this in old fashioned way (don't you think that it > will work just fine), just do: -- Best regards, Edgar Chupit callto://edgar.chupit -- //www.freelists.org/webpage/oracle-l