10
Reply

How could use Dynamic query result in order by?

Mani Kandan

Mani Kandan

Oct 18 2016 9:28 AM
365
Hello everyone,
 
I have a Dynamic sql query. The query executed order by passing this parameter (@SortColumn, for eg: 'agencyname asc'). And this output insert into the a table and another procedure for select all items from the table. My problem is, 1st query giving order by item but second query not giving order by items. How can I get data from second query as the order by format?

Answers (10)