----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Doug Coning" <[EMAIL PROTECTED]> Sent: Thursday, January 23, 2003 9:15 AM Subject: Re: Is this possible?
> Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > sql,query,queries,smallint > > If you just reply to this message, and include the entire text of it in the > reply, your reply will go through. However, you should > first review the text of the message to make sure it has something to do > with MySQL. Just typing the word MySQL once will be sufficient, for example. > > You have written the following: > > I am trying to merge the results of multiple columns into 1 column or Alias, > group them and sort them. > > So if I had a table with 4 fields: Cat1, Cat2, Cat3, & Cat4 like such: > > +-----+------+-----+------+ > | Cat1| Cat2 | Cat3| Cat4 | > +-----+------+-----+------+ > | F | A | | A | > | D | C | H | A | > | G | | | | > | F | B | I | A | > +-----+------+-----+------+ > > It would select all the values, merge them into 1 column, group them, and > sort them like such so that the result would be a single column, returning > only 1 instance of each returned value: > > +--------+ > | Result | > +--------+ > | A | > | B | > | C | > | D | > | F | > | G | > | H | > | I | > +--------+ > > Is there as singe Select command that can do this? Right now I am using a > temporary table where I first clear out the values, then copy each column > one at a time over into the tables... It works, however, I was wondering if > there is an easier way to get the single column result with all the merged > information without having to use a temporary table... > > Thanks, > > Doug Coning > > > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php