I have a dynamic sql like ' Select || fields|| from || tab|| where || where_clause||
here fields,tab & where_clause is populated dynamically.
I have a requirmeent, wherein,I have to execute this query ,which will result in multiple rows and result of each rows to be concatenated (1,'abc','23-03-2003') and retuned ,to be used in a Insert proc which I have.
I have the logic for concatenation of values depending on the datatype,but how do I loop through each record for the above query????
Can anybody help me or anybody has a reusable code for doing this.
I am able to achieve it if the dynamic sql return only one row. If the query return more than one row,how do I achieve that.
Once I execute th query,how do I find that ,it has reurned more than 1 row and how do I bind it later???
I would appreciate ur ans in this rgd