The code below is for a cursor that im using. What i want it to do is use the value stored in :mine_data.table_name_list as the table name.
When ive tried to code it, as shown below but commented out, it comes back with error 103. I think i need to use dynamic sql but am not sure of the syntax, can anyone offer any suggestions?
DECLARE
CURSOR c_frequent_items IS
SELECT distinct honours_points, count() count_star
from students /:mine_data.table_name_list/
group by honours_points
having count(*) >= :mine_data.support_value_text;
BEGIN
go_block('frequent_items');
FOR cursor_rec IN c_frequent_items
LOOP
create_record;
:frequent_items.honours_points:=cursor_rec.honours_points;
:frequent_items.count_star:=cursor_rec.count_star;
END LOOP;
END;
Thanx