PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > concatonating 2 SELECTS into the same result set?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
concatonating 2 SELECTS into the same result set?

Réponse
 
LinkBack Outils de la discussion
Vieux 17/09/2007, 21h37   #1
lister
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut concatonating 2 SELECTS into the same result set?

H all, newbie here again.

Is it possible to do two SELECTS in the same SQL call, and return the
results of both in the same result set?
(This two selects would be getting the same columns from the same
table).

Many thanks,
Lister

  Réponse avec citation
Vieux 17/09/2007, 21h39   #2
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

On Sep 17, 4:37 pm, lister <listerofsme...@hotmail.com> wrote:
> H all, newbie here again.
>
> Is it possible to do two SELECTS in the same SQL call, and return the
> results of both in the same result set?
> (This two selects would be getting the same columns from the same
> table).
>
> Many thanks,
> Lister


<http://dev.mysql.com/doc/refman/5.0/en/union.html>

  Réponse avec citation
Vieux 17/09/2007, 21h48   #3
lister
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

On Sep 17, 9:39 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:
> <http://dev.mysql.com/doc/refman/5.0/en/union.html>


You're a star! Thanks a million. :-)


  Réponse avec citation
Vieux 18/09/2007, 02h01   #4
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

On Sep 17, 4:48 pm, lister <listerofsme...@hotmail.com> wrote:
> On Sep 17, 9:39 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:
>
> > <http://dev.mysql.com/doc/refman/5.0/en/union.html>

>
> You're a star! Thanks a million. :-)


Not really. All I did was read the manual.

  Réponse avec citation
Vieux 18/09/2007, 10h34   #5
Paul Lautman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

ZeldorBlat wrote:
> On Sep 17, 4:48 pm, lister <listerofsme...@hotmail.com> wrote:
>> On Sep 17, 9:39 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:
>>
>>> <http://dev.mysql.com/doc/refman/5.0/en/union.html>

>>
>> You're a star! Thanks a million. :-)

>
> Not really. All I did was read the manual.


About 70% of the questions that I answer on this form I do so simply by
reading the manual.

Posters could save a lot of time by doing similar.


  Réponse avec citation
Vieux 19/09/2007, 05h18   #6
subtenante
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

On Tue, 18 Sep 2007 10:34:54 +0100, "Paul Lautman"
<paul.lautman@btinternet.com> wrote:

>About 70% of the questions that I answer on this form I do so simply by
>reading the manual.
>
>Posters could save a lot of time by doing similar.


Not when you don't know where to look.

I have read a lot of parts of the manual, and still can ask silly
questions here from time to time, because I missed something. It takes
30 seconds to somebody who knows, while it can take me more than one
hour to go to the very deep footnotes completely missing the headline,
because I thing I already read it.

And worse in that case : OP did not know that the correct word to look
for was union, he thought it was concatenate ; browsing the manual
would have been for this a waste of time. Now he knows where to read,
that's very valuable information that the manual can not give him
without a thorough review of it, which would take hours.
  Réponse avec citation
Vieux 19/09/2007, 08h56   #7
lister
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

On Sep 18, 10:34 am, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
> ZeldorBlat wrote:
> > On Sep 17, 4:48 pm, lister <listerofsme...@hotmail.com> wrote:
> >> On Sep 17, 9:39 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:

>
> >>> <http://dev.mysql.com/doc/refman/5.0/en/union.html>

>
> >> You're a star! Thanks a million. :-)

>
> > Not really. All I did was read the manual.

>
> About 70% of the questions that I answer on this form I do so simply by
> reading the manual.
>
> Posters could save a lot of time by doing similar.


I appreciate it must be frustrating for you, but finding anything in
the online mysql manual seems extremely difficult IMHO. Even when I
know the keyword it seems difficult to find the manual page for it.

  Réponse avec citation
Vieux 20/09/2007, 05h37   #8
subtenante
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: concatonating 2 SELECTS into the same result set?

On Wed, 19 Sep 2007 00:56:26 -0700, lister
<listerofsmeg01@hotmail.com> wrote:

>I appreciate it must be frustrating for you, but finding anything in
>the online mysql manual seems extremely difficult IMHO. Even when I
>know the keyword it seems difficult to find the manual page for it.


I downloaded a CHM version. It's findable on any P2P thing. Search for
MySQL CHM. If you are under linux, there are some chm viewers (I use
gnochm, because of gnome, but you can find a few others).
It lets you make searches in the whole document easily, and you always
have it offline.
It's *very* valuable.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h45.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10868 seconds with 16 queries