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
Prudent use of Debug.Assert versus exception logging
Computer won't recognize Seagate Freeagent Go 320gb
Oracle SQL containing word
prstat vs top command
VBA macro script populating cells from data source
builing a basic Advertise with Us Functionality!
Syntax error (missing operator) in query expression
Replacing Keyboard on Toshiba Portege A600
Looking for Excel User Function not Text to Columns to Convert text values to date values.
Sysprep failed to set computername