B
Bryan Harrington
Can you use Select top 40 * from ... and ORDER BY... in the same query?
I have the following 4 quearies that are.. for the most part, the same
except the order by clause, all return a differnt amount of records.
Thoughts?
select top 40 * from q_work_list where assigned_to = 10 order by batch_date,
remit_amt desc
40 records returned.
Sort by Reject Amt
select top 40 * from q_work_list where assigned_to = 10 Order by remit_amt
asc
41 records returned.
Sort By Batch Date
select top 40 * from q_work_list where assigned_to = 10 Order by batch_date
desc
110 records returned.
Sort by Batch Again
select top 40 * from q_work_list where assigned_to = 10 Order by batch_date
asc
143 records returned.
And it doesn't make a difference if I use * or the appropriate field names..
same results.
TIA
I have the following 4 quearies that are.. for the most part, the same
except the order by clause, all return a differnt amount of records.
Thoughts?
select top 40 * from q_work_list where assigned_to = 10 order by batch_date,
remit_amt desc
40 records returned.
Sort by Reject Amt
select top 40 * from q_work_list where assigned_to = 10 Order by remit_amt
asc
41 records returned.
Sort By Batch Date
select top 40 * from q_work_list where assigned_to = 10 Order by batch_date
desc
110 records returned.
Sort by Batch Again
select top 40 * from q_work_list where assigned_to = 10 Order by batch_date
asc
143 records returned.
And it doesn't make a difference if I use * or the appropriate field names..
same results.
TIA