Hi Team,

I am using SQL Query(Converting Rows to Columns & Joins ) to populate Table records. 

List navigation is not working with the SQL query, can you please suggest me how to resolve it?


Thanks

Phani


Hi,

When you write the SQL query and want to have pagination then you need one more query to get the total count. In my example (I have oracle) I have two query one to get the record like below and from second query you get the count I have stored it in SqlQueryTotalCount.

SELECT {Table1}.[COlumn1], {Table1}.[COlumn2]
FROM {Table1}
ORDER BY @OrderBy
OFFSET @PaginationIndex ROWS FETCH NEXT @LineCount ROWS ONLY

SELECT Count(*)
FROM {Table1}

Regards.