Works a treat thank you - but now I have a new issue if anyone can help please. The CSV file opens in the browser rather than comes up for download - I suspect this is a browser issue rather than a code issue - can anyone provide any clues please.
++++++++++ Kevin Parker Advanced Imaging e: webmas...@advancedimaging.com.au w: www.advancedimaging.com.au m: 0418 815 527 ++++++++++ http://au.linkedin.com/in/krparker -----Original Message----- From: Kym Kovan [mailto:dev-li...@mbcomms.net.au] Sent: Saturday, 19 March 2011 16:42 To: cf-talk Subject: Re: Converting Boolean in the query 2nd go with all of the info this time :-) the YesNoFormat() function is the go on the cfml side outside the query if you can do that rather than inside the SQL Inside SQL you need a CASE as there is no IIF, this explains nicely: http://www.sql-server-performance.com/faq/iif_tsql_p1.aspx Kym K On 19/03/2011 16:18, Kevin Parker wrote: > > Appreciate a little bit of advice please. > > I am creating a small bit of script to dump some data to a csv file. I want > to convert a Boolean field to a Yes or No inside the query. > > I've used this technique in my SELECT statement from scouring the net. > > IIF(PractitionerNews, 'YES', 'NO') AS MyConvertedField > > However, this returns an error... > > [Macromedia][SQLServer JDBC Driver][SQLServer]'IIF' is not a recognized > built-in function name. > > The box is running CF8 and SQL 2005. > > Is this the recommended approach in CFML or is there a better way. > > TIA!!!!! > > ++++++++++ > Kevin Parker > ++++++++++ > -- Yours, Kym Kovan mbcomms.net.au ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:343134 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm