Filter examples more than one single filter

The following examples show various ways to code for more than one single filter:

Example: Filter by range in OR (UNION)
The following example reproduces the query created using filter by range value for NAME and SURNAME , where the values are:
  • from ALBERT to STEPHEN for NAME
  • from LENNON to MORANIS for SURNAME
SELECT A.* FROM "DELGT"."CUSTOMER" A 
WHERE A.NAME BETWEEN 'ALBERT' AND 'STEPHEN'
UNION
SELECT A.* FROM DELGT.CUSTOMER A 
WHERE A.SURNAME BETWEEN 'LENNON' AND 'MORANIS'
Example: Filter by range in AND (INTERSECT)
The following example reproduces the query created using filter by range value for NAME and SURNAME , where the values are:
  • from ALBERT to STEPHEN for NAME
  • from LENNON to MORANIS for SURNAME
SELECT A.* FROM "DELGT"."CUSTOMER" A 
WHERE A.NAME BETWEEN 'ALBERT' AND 'STEPHEN'
INTERSECT
SELECT A.* FROM DELGT.CUSTOMER A 
WHERE A.SURNAME BETWEEN 'LENNON' AND 'MORANIS'
Example: Filter by list value in OR (UNION)
The following example reproduces the query created using filter by list value for NAME and SURNAME , where the values are:
  • ALBERT, TOM and STEPHEN for NAME
  • LENNON, ROSS and MORANIS for SURNAME
SELECT A.* FROM "DELGT"."CUSTOMER" A 
WHERE ((A.NAME) IN ('ALBERT','TOM' ,'STEPHEN'))
UNION
SELECT A.* FROM DELGT.CUSTOMER A 
WHERE ((A.SURNAME) IN ('LENNON', 'ROSS', 'MORANIS'))
Example: Filter by list value in AND (INTERSECT)
The following example reproduces the query created using filter by list value for NAME and SURNAME , where the values are:
  • ALBERT, TOM and STEPHEN for NAME
  • LENNON, ROSS and MORANIS for SURNAME
SELECT A.* FROM "DELGT"."CUSTOMER" A 
WHERE ((A.NAME) IN ('ALBERT','TOM' ,'STEPHEN'))
INTERSECT
SELECT A.* FROM DELGT.CUSTOMER A 
WHERE ((A.SURNAME) IN ('LENNON', 'ROSS', 'MORANIS'))