Re: How do I run a SQL query and order the result set by a calcula

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mark (Mark_at_discussions.microsoft.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 03:15:04 -0800

Hi Cindy,
This does NOT work - you skipped the GROUP BY clause!
Mark

"Cindy Winegarden" wrote:

> Hi ExtraT,
>
> One more way, besides what Dan said, is to use numbers.
>
> Select ;
> FirstName,
> LastName, ;
> Count(*) As NumRows ;
> From ;
> Names ;
> Order By
> 3, 2, 1
>
> --
> Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
> cindy_winegarden@msn.com www.cindywinegarden.com
>
>
> "ExtraT" <nospam@nospam.net> wrote in message
> news:1109107323.13d23f595aec5bf9cdcb6a96cfb6b50d@teranews...
> > If I want to run a SQL query and order the result set by a calculated
> > field, how should I do that?
>
>
>



Relevant Pages

  • Re: show 0 values
    ... Thanks Dan for your help. ... I removed the where clause and add those conditions into join ... reference the service in ref table, ... incident#, service, desc, date ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Tuning question
    ... > sql queries. ... Dan, in my experience this very seldom makes a difference these days ... What is important in the predicate clause is using functions on the ...
    (comp.databases.oracle.misc)
  • Re: Reusing the result of an expression in select query
    ... Orlando Amador schrieb: ... This has created a very big SQL query. ... Looks like With clause is for 10.2? ... Any suggestions for Oracle 9? ...
    (comp.databases.oracle.server)
  • C# Paradox Database odbc
    ... I set up the connection using the wizards and in Server Explorer I can see ... If I do a SQL Query, ... Error in SELECT clause: expression near '''. ... Unable to parse query test. ...
    (microsoft.public.data.odbc)
  • Re: Reusing the result of an expression in select query
    ... DA Morgan wrote: ... This has created a very big SQL query. ... Looks like With clause is for 10.2? ... Any suggestions for Oracle 9? ...
    (comp.databases.oracle.server)