Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

 

Overview

In addition

to

to variable subsetting, RDS also supports comprehensive and complex record subsetting. This is done though the where parameter. The where clause is similar to that of a relational database where users can specify logical operations that will be evaluated to subset the data set.

 

Supported Where Functions

NameOperator
Greater than or equal to>=
Greater than>
Equal to=
Less than<
Less than or equal to<=
Not equal to!=
Like a particular valuelike
Matches a regular expressionmatches
Panel

On this page:

Table of Contents

Step By Step

Simple Where Clauses

  • Users may specify a where clause to filter the records as follows. 

    Code Block
    titleWhere VAR1 is Greater Than or Equal to One
     http://{host}/rds/{collection}/{view}/select?where=VAR1>=1
    Code Block
    titleWhere VAR1 is Greater Than One
     http://{host}/rds/{collection}/{view}/select?where=VAR1>1
    Code Block
    titleWhere VAR1 is Equal to One
     http://{host}/rds/{collection}/{view}/select?where=VAR1=1
    Code Block
    titleWhere VAR1 is Less Than One
     http://{host}/rds/{collection}/{view}/select?where=VAR1<1
    Code Block
    titleWhere VAR1 is Less Than or Equal to One
     http://{host}/rds/{collection}/{view}/select?where=VAR1<=1
    Code Block
    titleWhere VAR1 Starts With One
     http://{host}/rds/{collection}/{view}/select?where=VAR1 like '1%25'
    Code Block
    titleWhere VAR1 is Matches a Two Digit Number Starting With One
     http://{host}/rds/{collection}/{view}/select?where=VAR1 matches '[1][0-9]'

Where Clauses With Logical Operators

  • Individual filtering parameters can be combined with logical operators AND or OR. 

    Code Block
    titleWhere VAR1 Equals One and VAR2 Does Not Equal One or VAR3 Equals Two
      http://{host}/rds/{collection}/{view}/select?where=(VAR1=1 AND VAR2!=1) OR VAR3=2