Skip to Content
0
Former Member
Feb 11, 2014 at 10:45 AM

Dynamic select inside storedprocedure

26 Views

Hi All,

I have a requirement to generate the dynamic select statement . Procedure will accept the table name and schema name as parameters and return the select statement.

I could able to get the column names from sys.columns table. How to loop through the rows and concatenate the column values into single string?

Regards,

Suman.