Saturday, May 4, 2013

Example of a RETS Query and its Explanation


Please got to the following link to get the full list of  Query language BNF


Here is a small example and its explanation is in below
Example:

Query=(ST=|ACT,SOLD),
(LP=200000-350000),
(STR=RIVER*),
(STYLE=RANCH),
(EXT=WTRFRNT,DOCK),
(LDATE=2000-03-01),
(REM=FORECLOSE),
(TYPE=~CONDO,TWNHME),
(OWNER=P?LE)

Verbally, this would be interpreted as "return properties with (ST equal ACT or SOLD) and (LP between 200000 and 350000, inclusive) and (STRbeginning with RIVER) and (STYLE equal RANCH) and (EXT equal WTRFRNT and DOCK) and (LDATE greater than or equal to 2000-03-01) and (REMcontaining FORECLOSE) and (TYPE not equal to CONDO and not equal to TWNHME) and (OWNER starting with P and having LE in the 3rd and 4th characters)."

I hope this will help lots of People who are working with RETS and don't know how to make query to RETS server.

2 comments:

  1. hi how could you do a

    MLNUM = Value_X OR MLDATE = Value_Y

    I tried QUERY=(MLNUM=Value_X)|(MLDATE=Value_Y))
    No luck. Can you help me please! Thanks!

    ReplyDelete
    Replies
    1. From the official documentation I did not get any query like this what you needed... So far I know you can use "or , | " operator for the value of the field. like (Status=|ACT,SOLD)

      Delete