Returns the number of columns specified in the ORDER BY clause of a Transact-SQL SELECT statement.
SqlNumOrders% ( sqlconn% )
where
The number of ORDER BY columns.
Once a SELECT statement is executed and SqlResults% returns SUCCEED, call SqlNumOrders% to find out how many columns are specified in the current statement's ORDER BY clause.