NEED HELP FAST: How to execute a dynamic sql statement on post_query trigger
Posted on 2003-02-26
How can I execute a dynamic sql statement in forms on a trigger. ie.
my_sql := 'select ' || col_name || ' into my_count, my_count1, my_count2,my_count3 from ets_item_dashboard where item_type = ' || '''' || :ets_item_dashboard.item_type || '''' ||
' and org_id = ' || '''' || :ets_item_dashboard.org_id || '''' ;
:control.v1 := my_count
:control.v2 := my_count1
:control.v3 := my_count2
:control.v4 := my_count3
I need to be able to populate several field afterwards. There is considerable more to the routine. However I need to be able to create the statement this way as the column name can change.