Here's the error I'm getting, and below that, is the code that's apparently
causing it. Now, here's the really weird part. SOME...I repeat...SOME words
and phrases actually *WORK*. In other words, I can type "heart" or "cancer"
and return a legit, fine recordset, all UNION'ed and sorted correctly.
However, certain words and phrases cause the error below:


Query Of Queries runtime error.
All resulting columns of queries in a SELECT statement containing a UNION
operator must have corresponding types.
Columns with index number equal "3" have diffent types (VARCHAR, OTHER).

Here's the code I'm using:
    <CFSEARCH
       name = "GetLevel2Content"
       collection = "Level2Content"
       criteria = "#Form.Criteria#"
       startRow = "#Form.StartRow#"
    >
     <CFSEARCH
       name = "GetLevel3Content"
       collection = "Level3Content"
       criteria = "#Form.Criteria#"
       startRow = "#Form.StartRow#"
    >    
    <CFSEARCH
       name = "GetLevel4Content"
       collection = "Level4Content"
       criteria = "#Form.Criteria#"
       startRow = "#Form.StartRow#"
    >    
    <CFSEARCH
       name = "GetLevel5Content"
       collection = "Level5Content"
       criteria = "#Form.Criteria#"
       startRow = "#Form.StartRow#"
    >    
    <CFSEARCH
       name = "GetPrograms"
       collection = "McLeodPrograms"
       criteria = "#Form.Criteria#"
       startRow = "#Form.StartRow#"
    >    
     
    <cfquery name="Combine" dbtype="query">
    SELECT * 
    FROM GetLevel2Content

    UNION
    SELECT * 
    FROM GetLevel3Content

    UNION
    SELECT * 
    FROM GetLevel4Content

    UNION
    SELECT * 
    FROM GetLevel5Content

    UNION
    SELECT * 
    FROM GetPrograms
    
    ORDER BY Score desc
    </cfquery>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

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

Reply via email to