Union Select sorting

From: Gerald Stanley (gcstanley_at_d-s-l.pipex.comREMOVE-)
Date: 05/28/04


Date: Fri, 28 May 2004 08:05:43 -0700

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
>
>
>
>.
>



Relevant Pages

  • 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. ...
    (microsoft.public.access.queries)
  • Re: Establishing Precedence In ORDERBY Condition Causing Problems.
    ... tab4.login_date from (select distinct emailAddress from Users union ... I created the UserPrecedence table that describes the ordered ... ORDER BY CASE @sort ... The sp_ prefix is reserved for system procedures, and SQL Server first ...
    (comp.databases.ms-sqlserver)
  • Re: Increase field size
    ... UNION, GROUP, SORT, etc but I would want to limit the length, restrict ... the contents (allow Unicode and you will get Unicode ), ... Ah yes, table-level CHECK constraints, the DECIMAL data type (including ...
    (microsoft.public.access.formscoding)
  • RE: Query sort not working after NULL column
    ... There is no sorting in any of the queries except the last one. ... that and sort when the query is run from VB. ... UNION ALL but I'm sure that will complicate things even more and lead me to ... have to insert even another extra query to get rid of the duplicates. ...
    (microsoft.public.access.queries)
  • How to use UNION ALL and SORT BY
    ... I have an asp site where I sell some products. ... UNION ALL ... I'd like to sort the results by "productid", ... following error message from my editor: ...
    (comp.databases.ms-access)