If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Union Select sorting
I'm having trouble sorting a Union Select query. I would like to sort on a hidden field, but from what I've read in help the only 'order by' field that I can add has to be one that is selected in both queries that I'm joining.
Suggestions? Thanks for your help |
#2
|
|||
|
|||
Union Select sorting
The Help file speaks the truth. The ORDER BY clause can
only relate to the columns output as it references the column names assigned (either explicity or implicitly) in the first part of the UNION. You will have to include your hidden column if you wish to sort by it. Hope This Helps Gerald Stanley MCSD -----Original Message----- I'm having trouble sorting a Union Select query. I would like to sort on a hidden field, but from what I've read in help the only 'order by' field that I can add has to be one that is selected in both queries that I'm joining. Suggestions? Thanks for your help . |
#3
|
|||
|
|||
Union Select sorting
A work-around is to include the "hidden" Field in the Union Query then
create a new Select Query using the Union Query as the DataSource. Include all other Fields (i.e. excluding the "hidden" Field) in the return list and sort by the "hidden" Field. -- HTH Van T. Dinh MVP (Access) "JR" wrote in message ... I'm having trouble sorting a Union Select query. I would like to sort on a hidden field, but from what I've read in help the only 'order by' field that I can add has to be one that is selected in both queries that I'm joining. Suggestions? Thanks for your help |
Thread Tools | |
Display Modes | |
|
|