Discussion: Order By question
Afficher un message
Vieux 13/02/2008, 19h20   #3
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Order By question

On Wed, 13 Feb 2008 09:38:18 -0800 (PST), Vamp4L wrote:
> Is there any way to order across multiple tables at the same time?
>
> For example, I have 2 separate tables, A and B that contain names of
> users
> A third table contains fields which relate A and B
> Is there a way to order by names from table A and B simultaneously?
> Like maybe combine A and B and the sort that result?


You can always select data into a temporary table and do your stuff
against that. There may be a way to do it against the tables as is, but
we'd need to know a lot more about the specifics of the tables involves
and the interrelationships, and you'll probably get a lot of advice
about how to rearrange your whole database in the process... Not a
criticism, but for most things with SQL, if what you want is really hard
to figure out, it's *probably* because what you want wasn't designed in
rather than because the task is inherantly complicated. And, if you want
to do this thing more than once, it's probably worth fixing a clunky
design so you don't have the same kind of problem next time.

--
64. I will see a competent psychiatrist and get cured of all extremely
unusual phobias and bizarre compulsive habits which could prove to
be a disadvantage.
--Peter Anspach's list of things to do as an Evil Overlord
  Réponse avec citation
 
Page generated in 0,04875 seconds with 9 queries