Microsoft
Software
Hardware
Network
Question : Sort union query on extra field
I've made a union query and added an extra field for sorting purposes. Is it possible to sort on the extra field without showing the extra field?
SELECT qryCMREmailContacts.WebID,
qryCMREmailContacts.Email,
"" as AE
FROM qryCMREmailContacts
UNION
SELECT qryCMREmailContactsAE.WebI
D, qryCMREmailContactsAE.AEEm
ail as Email, "1" as AE
FROM qryCMREmailContactsAE
Order by WebID, AE, Email;
Answer : Sort union query on extra field
maybe i got it wrong... you can always wrap it with another select like this
select a,b from (
select a,b,c from table1
union
select a,b,c from table2
) x order by c
Random Solutions
Auto Send Excel as Email Attachment
Firefox css border on inside of div when embedding Flash with SWFObject, why?
Add Property to asp.net user control to make reusable
Dlookup getting #name Error with subform
Outlook 2010 NK2 file
Block Logme internally
Users experiencing network connectivity issues on Multihomed Windows Server 2008 DC
How to retrieve a Joomla database password - GoDaddy installation
Change primary smtp addresses for 29 users using powershell for exchange
How many keywords is too many in the meta data?