- Joined
- Jan 20, 2009
- Messages
- 21,122
- Likes received
- 773
- Thanks received
- 222
- Location
- Clown World
Trying to do summat like this
OPEN-FOR-USING Statement

Feel like I have read and re-read this article and am not trying anything special. Why would it fail to inject the bind variable into the placeholder?
OPEN-FOR-USING Statement
Code:
DECLARE
TYPE MyCurTyp IS REF CURSOR; -- define weak REF CURSOR type
myCursor MyCurTyp; -- declare cursor variable
someTable NVARCHAR2(100);
BEGIN
someTable := 'FFS';
OPEN myCursor FOR -- open cursor variable
'SELECT col1,col2 FROM :a ' USING someTable;
...
END;
Error, invalid table name

Feel like I have read and re-read this article and am not trying anything special. Why would it fail to inject the bind variable into the placeholder?
**Waits for scope creep**


