I want to use the UNION operator to combine two SELECT statements. My problem is 
that one of the SELECTs draws data that has one less column than the other, 
because the table used in the second is missing one of the columns found in the first. 
I'm trying to work out a way to create a dummy boolean column in the second query 
and populate it with the value of 0, so the UNION operator works.

Something like

SELECT Column1, Column 2, Column3
FROM Table1
        UNION 
SELECT Column1, Column2, 0 as Column3
FROM Table2

This doesn't work. What will?

Gene Kraybill

---------------------------------
Gene Kraybill
LPW & Associates LLC
www.lpw.net

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to