> HI everybody > > I have a table with two email addresses for every person there are > cases though that emailaddr1 is empty and emailaddr2 has a value. I > need to output the addresses that if emailaddr1 is empty it would be > substituted by emailaddr2. I tried using a cfif inside the query > written below but doesn't work > > <cfquery name="recipients" datasource="labels"> > SELECT <cfif (emailaddr1)eq "">emailaddr2, <cfelse> emailaddr1</cfif> > </cfquery> > > <cfoutput>#recipients#</cfoutput> > > thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331302 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm