Paul, I didn't want you to feel inferior! But seeing as you have said... lol!
Dave -----Original Message----- From: ProFox [mailto:[email protected]] On Behalf Of Paul Newton Sent: 12 March 2014 13:32 To: [email protected] Subject: RE: SQL Select not working as expected Dave In other words, yes, I was missing something blindingly obvious <g> Many thanks Paul -----Original Message----- From: ProfoxTech [mailto:[email protected]] On Behalf Of Dave Crozier Sent: 12 March 2014 13:27 To: [email protected] Subject: RE: SQL Select not working as expected Its the Set ANSI setting you need to look at not the set exact! Dave -----Original Message----- From: ProFox [mailto:[email protected]] On Behalf Of Paul Newton Sent: 12 March 2014 13:25 To: [email protected] Subject: SQL Select not working as expected Hi all The following two statements work as expected when executed against SQL server and return two rows Select pn_bic,pn_iban,pn_bankac,pn_banksor ; from pname ; where Ltrim(Rtrim(pn_bic)) <> '' and Ltrim(Rtrim(pn_iban)) <> '' and Ltrim(Rtrim(pn_bankac)) <> '' and Ltrim(Rtrim(pn_banksor)) <> '' Select pn_bic,pn_iban,pn_bankac,pn_banksor from pname ; where '' <> Ltrim(Rtrim(pn_bic)) and '' <> Ltrim(Rtrim(pn_iban)) and '' <> Ltrim(Rtrim(pn_bankac)) and '' <> Ltrim(Rtrim(pn_banksor)) When executed against VFP (same data) no results are returned. I have tried SET EXACT ON and OFF and have tested with ENGINEBEHAVIOR 70, 80 and 90. Am I missing something blindingly obvious? The workaround is to use Not Empty(pn_bic) etc but I do not understand why neither of the two statements above works. Many thanks Paul Newton [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

