Skip to Content
0
Nov 11, 2014 at 03:18 PM

Dynamic Select Query with dynamically determined fields and table

34 Views

Hello Experts,

I have got a requirement in which I have to fetch the table name from table TAB1 and fields from table TAB2.

I am not sure which all fields will be present in TAB2 and hence I cannot do a Select * on TAB1. I have to select only those fields which are mentioned in TAB2.

Can anyone suggest which logic with some code so that this requirement can be fulfilled.

Thanks

Jaydeep