Jeff wrote: > 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).
CF does not remember what datatypes columns are, it tries to determine on the fly. So if the first record of some column contains 'april 2001' Cf thinks it is a date and will assume the whole column is a date column. Naturally it is really a string, but it will prevent you from unioning it to some other string column. The only workaround I know is prepending some garbage string to each record so you force CF to recognize it as a string. Then after the unioning you can strip it off. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

