I am trying to connect to a Real Estate Transaction Standards (RETS) server to pull listing where Matrix_Unique_Id
is in a list of bigint
values.
My DMQL query IN-clause looks something like this
(Matrix_Unique_Id=|123456789456,845686745,845156413,8654543354)
However, that is giving me the following error
DMQL: Invalid BigInt criteria for field 'Matrix_Unique_ID'string
If I use the same syntax to search for a string in a list it works fine for example
(Status=|Active,Pending,Expired)
How can I search the listing where Matrix_Unique_Id in a long list of values?
It turned out to be that IN Syntax works only for string types.
To get the bigint
working, I had to do the following nasty syntax
(Matrix_Unique_Id=123456789456)|(Matrix_Unique_Id=845686745)|(Matrix_Unique_Id=845156413)|(Matrix_Unique_Id=8654543354)
The above gave me the intended result. However, since this makes the request URI much lengthier, I had to submit multiple requests to avoid HTTP error code 404
or 414
.
There is difference between DMQL query IN-clause for normal field and lookup field in RETS server.
In your first example you gave the query with pipe symbol "|" . But then it will work for lookup values like "Status", "City", "County" etc.
You should try like this for Matrix_Unique_Id(normal field),
(Matrix_Unique_Id=123456789456,845686745,845156413,8654543354)
The answer you have written also correct, but then its lengthy and useful only for multiple fields in query.
Note: There is no difference for either bigint or string while querying.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.