Merge SQL Fields for like-Search & Nested Or

Posts   
 
    
tommy
User
Posts: 5
Joined: 28-Feb-2007
# Posted on: 03-Apr-2007 15:17:37   

Hello Community,

i have two questions about filter.

First one is - how to realize this SQL Statement (Northwind-Database e.g.)

select
    *
from
    Customers
where
    (Address + City) like '%Obere%Berlin%'

Address and City are fields of Table Customers

The second Question is, how to realize nested or-statements

...
where F1=Ex1 or (F2=Ex2 and F3=Ex3 or (etc...) )
...

Do you have Examples for this two problems (Adapter-Way)

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-Apr-2007 04:58:33   
select
    *
from
    Customers
where
    (Address + City) like '%Obere%Berlin%'

... Please read the first three post of the the thread http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=9144

For the second question: As I know, expressions allows parenthesis, and you can of course use one expression for echa parenthesis set.

David Elizondo | LLBLGen Support Team