posted 10 years ago
In PL/SQL, you cannot just select from a table. You need to somehow process the result of the select. In your case, you'll probably want to store it in a variable that can hold the entire row of the MYADMIN table.
Furthermore, there's no need to use dynamic SQL (the execute immediate) in this case. And if you do, you need to process bind variables correctly. The 'Invalid identifier' error is probably caused by including the empid variable in the command text.
So the procedure with the above suggestions incorporated would probably look like this: