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
DOS print to PDF ?
how to add swap partition to exsting swap in redhat linux
'SettingsSingleFileGenerat
or' 'ResXFileCodeGenerator' problem
ACT 2009 - How to Move database
I need a help to make a small project with autocomplete functions
Auto fill user name in "Login" field
Colour highlighted search in vi
Citrix not finding the license server
how to truncate the transaction logs in exchange 2010 after NT backup
I need to query each group in an OU in the Root Domain and get the group names that has exact identical users.