Paul Giesenhagen wrote:
> I am putting together an application and I canot use UNION, here is my query that I 
>have used in the past, does anyone have a solution that would not use UNION?
> 
> SELECT state, state_abv
> FROM #request.taxStateTable#
> UNION ALL
> SELECT province AS state, province_abv AS state_abv
> FROM #request.taxCanadaTable#
> ORDER BY 1

SELECT
        CASE WHEN tST.state IS NULL
                THEN tCT.province
                ELSE tST.state END AS state,
        CASE WHEN tST.state_abv IS NULL
                THEN tCT.province_abv
                ELSE tST.state_abv END AS state_abv
FROM
        #request.taxStateTable# tST
        FULL OUTER JOIN
                #request.taxCanadaTable# tCT

Jochem

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to