
April 25th, 2004, 10:51 AM
|
|
Registered User
|
|
Join Date: Apr 2004
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Combining recordsets into one
I have one table with realestate listings in it. My client wants to take their listings from this table, sorted by price, and combine those with the listings from everyone else, also sort by price. This would be simple if everything could be lumped together, but the client wants all of their listings to show up first. I don't think a UNION statement would work because I can only sort the entire resultant recordset, but I need to sort them seperately before joining them. The desired result list would be like:
myclientlisting $150,000
myclientlisting $140,000
myclientlisting $130,000
othercompany $147,500
othercompany $141,000
othercompany $129,900
Would I be best off by executing the first sorted query, writing it to a temp table, then executing the second sorted query and appending it to the temp table, or is there a better way? It might also help to know I'm using recordset.absolutepage, recordset.cursorlocation and recordset.pagesize to page through the recordset so using an array would require some major recoding.
|