Abhilash J A

Abhilash J A

  • 530
  • 2.4k
  • 598k

How could use Dynamic query result in order by?

Oct 18 2016 9:28 AM
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)