Knowledge Center

Filtering in RamBase

RamBase supports the following operators for filter expressions

Operator

Meaning

Example

=

Equal to

PART="ABC"

<>

Not equal to

PART<>"ABC"

>

Greater than

PART>100

<

Less than

PART<100

>=

Greater than or equal to

PART>=100

<=

Less than or equal to

PART<=100

,

And

PART="ABC",PRICE>100

:

Begins with

PART:ABC

RamBase supports the following wild cards

Wild cards can be used in certain filter expressions to substitute for one, or several unspecified characters in the expression.

Wild card

Meaning

Example

*

Zero, one, or more than one unspecified characters

PART="ABC*" (Will give all PARTs beginning with ABC)

?

One unspecified character

PART="ABC?" (Will give all PARTs made up of 4 characters beginning with ABC)

Note that wild cards, especially when placed at the start of the expression (TEXT="*ABC"), may increase the response time in some situations. In these cases you should consider if the same search can be done without using a leading wild card.

Avoid using wild cards in expressions that use ‘>’ (Greater than) ‘<’ (Less than), ‘>=’ (Greater than or equal to) and ‘<=’ (Less than or equal to), as this will behave differently depending on the type of field the filter is set against and the result may not be obvious.

Filtering on DATE- and PERIOD-fields

Task

Operators

Examples

Filter by specific date or specific date interval

‘=’,’>’,’<’,’>=’,’<=’,’<>’

DATE="2015.01.01"

DATE>="2015.01.01"

DATE>="2015.01.01",DATE<="2015.01.31"

Filter by year

=

DATE="2015*" (All of 2015)

Filter by month

=

DATE="2015.01*" (All of January 2015)

Filter by week

=

DATE="*1501" (Week 1 of 2015)

Filter by period

=

PERIOD="201501"

Filtering on NUMBER-fields

Task

Operators

Examples

Select all that are equal to a given number

‘=’

PRICE=100

Select all that are greater than a given number

‘>’

PRICE>100

Select all that are greater or equal to a given number

‘>=’

PRICE>=100

Select all that are less than a given number

‘<’

PRICE<100

Select all that are less or equal to a given number

‘<=’

PRICE<=100

Select all that are not equal to a given number

‘<>’

PRICE<>100

Select all that have a value

‘>’

PRICE>0

Filtering on TEXT-fields

Upper- and Lower-case are not differentiated when filtering on TEXT-fields.

Spaces will be taken into account, so for instance filtering on TEXT="INKPRINTER" will cause "INK PRINTER" to be left out of the result.

If using ‘>’ (greater than) or ‘<’ (less than) in a filter, this will filter the TEXT based on a character for character basis. Take care if using ‘>’ or ‘<’ against TEXT fields that contain numbers as this may not behave as expected.

For instance, if filtering on TEXT>"1000" this would also include results where TEXT is "12". As TEXT-fields are compared on a character for character basis, the second character here will decide that 2 is greater than 0 and therefore include this in the result.

Task

Operators

Examples

Select all that are equal to a given value

‘=’

TEXT="INKPRINTER"

Select all that contain a certain value somewhere in the text

‘=’

TEXT="*PRINT*"

Select all that start with a certain value

‘=’

TEXT="INK*"

Select all that have no value

‘=’

TEXT=""