>Oddly it seems that I am getting all the records but at the end there is >what seems to be a blank email address. When I cfoutput the results it >outputs the text [empty string] at the end. Seems that should be impossible >with the LIKE email ='[EMAIL PROTECTED]' in the query . The query is ordered by email >so >I see this entry at the very end. I am disturbed that a blank email is >being >included in the query, but also disturbed that CF seems to be outputting >the >text [empty string] when it should just be blank! >
Don't be disturbed with CF, bet disturbed with the query. ;) You're AND-ing your NULL/blank string checks together instead of OR-ing them. Try switching and see what happens with your query results. Also, you should just be able to do: SELECT emailaddress FROM myTable WHERE emailaddress IS NOT NULL OR TRIM(emailaddress) != '' That should cover all instances of blank or NULL e-mail fields. I don't know if there's a TRIM() function in SQL Server, so you may have to do LTRIM(RTRIM(emailaddress)) to get the same effect (I'm on Oracle, so I just don't know that answer). Regards, Dave. _________________________________________________________________ Add MSN 8 Internet Software to your existing Internet access and enjoy patented spam protection and more. Sign up now! http://join.msn.com/?page=dept/byoa ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:138295 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com