Subject Re: [firebird-support] union on two columns of a table.
Author Martijn Tonies
> 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