Take the comments out. I suspect CF is sending the SQL as one line of text, so the comments are blitzing the latter part of the SQL, along with the parameter placeholder, so you're binding one more param than the JDBC driver thinks it needs.
>From memory (and cannot test @ the moment, sorry: don't have CF on this machine), that error is not saying what you're binding is invalid, it's that the number of bindings you're trying to make mismatches what the driver is expecting. -- Adam On 25 January 2013 19:45, Greg Morphis <gmorp...@gmail.com> wrote: > > Specifically it doesn't like this: > case when > (acp.date_received is not null or ac.payment_method = 'credit') > then 1 -- show init_refund > else 0 -- show nada > end as show_init_refund, > > > > On Fri, Jan 25, 2013 at 1:31 PM, Greg Morphis <gmorp...@gmail.com> wrote: > > > I removed this section of the query and it worked.. > > > > case when > > ( > > select 1 from conference_refund cr > > where ac.id = cr.attendee_conference_id > > and is_complete = 0 and active = 1 > > and (acp.date_received is not null or ac.payment_method = 'credit') > > ) is not null > > then 2 -- show process_refund > > when (acp.date_received is not null or ac.payment_method = 'credit') > > then 1 -- show init_refund > > else 0 -- show nada > > end as show_init_process_refund, > > > > so looks like back to the drawing board.. but why does it work without > the > > cfqueryparam? and it works fine in SQL Mgmt Studio? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354086 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm