I have data from two recordsets, Program and NewProgram, that need to be listed on one page. How do I co-mingle them in a list, so they are all in one alphabetical list?
If they have the same number/type of fields you may be able to do a union on the two SQL statements, reducing it to one SQL query and then add an ORDER BY to the whole thing.
So if you had:
"SELECT myString,myNumber FROM TableA"
and
"SELECT someString, someNumber FROM TableB"
you could combine them like so:
"(SELECT myString, myNumber FROM TableA) UNION (SELECT someString as myString, someNumber as myNumber FROM TableB) ORDER BY myString"
That may be a bit off, I haven't used a UNION in a couple months so my memory has already faded a bit, but the general logic ought to be sound (if your DB supports Unions).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.