Kind of. It's CF trying to be clever, and failing. With a QofQ, there isn't any metadata about the column types, so CF has to attemp to decypher it on the fly. Sometimes it works, sometimes it doesn't.
I suspect what's happening is that CF is assuming that the double hyphen means a date, so it's doing a date compare, and saying that the passed batch number isn't a valid date. I've never seen it happen like that, but I've seen it all the time with numbers. Build a query with a varchar column, but make sure the first few rows have a valid number for that column. You'll get the same error on the first row that has a non-numeric value in that column, even though it's storing varchar data. cheers, barneyb On Thu, 21 Oct 2004 13:25:13 -0400, Jonathan Nickle <[EMAIL PROTECTED]> wrote: > Data set example: > > Table name: Orders > ******************************************* > BatchNumber, CheckNumber, Name > 1111a, 1234, Joe Johnson > 1111a, 1235, Mary Madison > 12-32-1, 3434, Jon Johnson > 12-32-1, 3453, Victoria V > ******************************************** > > <cfquery name="getOrders" dataousre="#DSN#"> > Select * from Orders > </cfquery> > > <cfloop query="GetOrders"> > <cfset thisBatch = GetOrders.BatchNumber> > > <cfquery name="getBatchOrders" dbtype="query"> > select * > from getOrders > where BatchNumber = '#thisBatch#' > </cfqery> > > <cfloop query...> > .... > </cfloop> > </cfloop> > > The loop works until I reach the batch with two hyphens in it. It > handles numeric values, alphanumeric valuse, lenghts that are short and > long, and one hypen in the string... but once there are two hyphens in the > batch number it fails. > > It is NOT a possiblity to restrict two hyphens on the input as this is > a potentially valid batch number. The SQL statement works as straight > SQL against the DB, but fails when queried against a query. > > IS THIS A CF BUG?!!! > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/blog/ I currently have 2 GMail invites for the taking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.houseoffusion.com/banners/view.cfm?bannerid=11 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182233 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

