What you've written there, Les, will only get you records where BOTH before and after have a value. Is that what you want?
Perhaps you need to change the sql to read: SELECT * FROM myTABLE WHERE (before is not NULL or before <> '') OR (after is not NULL or after <> '') and database_id = #url.id# which in english means give me all the records from myTable where 'before' has a value OR 'after' has a value and the database_id is <whatever> Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 7/23/07, Les Mizzell <[EMAIL PROTECTED]> wrote: > Mike Kear wrote: > > If i recall, "<>'' "' is not the same as "is not NULL". So perhaps > > you need to change your query to something like: > > > > select * from myTABLE > > WHERE > > before is not NULL > > and after is not NULL > > and someID = #url.id# > > Which would see to lead me to this: > > SELECT * FROM myTABLE > WHERE > (before is not NULL or before <> '') > and (after is not NULL or after <> '') > and database_id = #url.id# > > But this returns zero results, and there's clearly cases where, "after" > has a value, so I' still not sure what I've got wrong. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284341 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4