Subject Re: [firebird-support] union on two columns of a table.
Author Julio César Carrascal Urquijo
Yes thanks. That did it.



On 4/13/06, Martijn Tonies <m.tonies@...> wrote:
>
>
> > Hi.
> >
> > I have a table with two integer columns and ~300 records in it. I need
> > to merge both columns into one but it seems union doesn't work if the
> > same table it's used:
> >
> > select col1
> > from tb1
> > union
> > select col2
> > from tb1
> >
> > Instead of retrieving 600 values from both columns I get the numbers
> > from 1 - 300. Both columns are of the same type and I'm using Firebird
> > 1.5.3 SS on Windows XP.
>
> Would a UNION ALL work?
>
> Martijn Tonies
> Database Workbench - development tool for Firebird and more!
> Upscene Productions
> http://www.upscene.com
> My thoughts:
> http://blog.upscene.com/martijn/
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>


--
Julio César Carrascal Urquijo
http://jcesar.f2o.org/

"Did you know that the first version of C++ was designed to be perfect? Where
none suffered, where everyone would be happy. It was a disaster. No one would
accept it. Entire programmers were lost. Some believed we lacked the means to
describe your perfect language. But I believe that, as a species, human beings
define their reality through suffering and misery. The perfect language was a
dream that your primitive cerebrum kept trying to wake up from. Which is why
C++ was redesigned to this: the peak of its popularity."
- El Agente Smith en Matrix... Bueno... No. En realidad no.