Requirement
I need a dynamic piece of code that will create a select statement based on the following:
I have an oracle table(ANALYSE_DATA) with 2 columns, Object_type, Field_name, Tick_Ind.
Object_type (Will be VIEW or table)
Field_Name is a name of a column
Field_name is a Tick_box that inputs a Yes and No
I need a dynamic piece of code that will generate a select statement that is run by selecting from this ANALYSE_DATA table
and then select the appropriate fields that are ticked from the appropriate table/view.
The select will be very basic with one condition.
So the final generated message from the dynamic piece of code will be
Select field1, field3, field4, field7
From table1
Where (field1 is null or field 3 is null or field4 is null or field7 is null)
Thanks