From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, Andrej Ricnik-Bay <andrej(dot)groups(at)gmail(dot)com> |
Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: SQL Order Question |
Date: | 2006-05-04 20:11:51 |
Message-ID: | 20060504201151.37921.qmail@web33301.mail.mud.yahoo.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
> > > > hi all,
> > > >
> > > > i want to order contract numbers id ascending
> > > order,
> > > > with the exception of 'BTS' that I want to
> display
> > > > first. the contract numbers are numeric and
> 'BTS'
> > > is
> > > > text. the numeric values come first when i
> sort
> > > in
> > > > asc order - as expected. how can i get BTS
> (id =
> > > 0)
> > > > to come up as the first value in my query?
> > > I'm not sure I fully understand the structure of
> > > your
> > > data ... do BTS and the numeric contract numbers
> > > appear in the same column?>
> > yes.
>
> Perhaps you could union two selects together?
>
almost, but not quite. if i use an order by, it
orders the entire output, not just the results of the
2nd select - so i'm back where i started. that is,
unless i'mmissing a piece to this puzzle.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2006-05-04 20:19:51 | Re: SQL Order Question |
Previous Message | Christian Hofmann | 2006-05-04 20:08:16 | SELECT FOR UPDATE - release lock? |