[libRETS-users] Compact - Compact Decoded format question
Keith T. Garner
kgarner at crt.realtors.org
Wed Jul 18 10:45:27 CDT 2007
On 7/17/07 5:47 PM, Agustin Garzon wrote:
> I'm having problems understanding the differences between compact and
> compact decoded format.
> I've been through the rets specs and found general information, but I'd
> like to see how it relates to my current implementation.
>
> The metadata shows me a table (Area, in Property > RESI) that is an INT
> data type.
You will also notice that its Interpretation is either Lookup or LookupMulti.
> When I perform the search, Area is returning a string, I guess it's
> because it's Decoded (it most people-readable), right?
Correct.
> So, it's making a conflict. So how do we deal with this? Is it possible
> that non CHARACTER fields contain strings?
Technically, its not a conflict based on the definition of COMPACT-DECODED.
At the very least COMPACT-DECODED will decode the Lookup from its "native
representation" to its Short Value or Long Value. Technically, it doesn't
follow the metadata, but that's the point of COMPACT-DECODED.
> Is it possible to get the actual INT from the field?
Yes, do your query with the format being forced to COMPACT. If you need the
values, do the decoding on the client side using the Lookup and Lookup-Type
metadata.
> Is it possible to
> tell what fields may contain strings besides their declared data type?
In general, the only time this will happen is with Lookups or LookupMultis
when using COMPACT-DECODED. However, I've seen an MLS format an integer
and/or decimal with a $ when the Interpretation was set to Currency for that
table.
> I hope you don't see this question too off-list-topic. I really
> appreciate your support.
Again, this was more about RETS in general rather than libRETS specifically,
but I didn't mind answering this one.
Keith
--
Keith T. Garner - Managing Director - Center for REALTOR® Technology
kgarner at realtors.org - 312-329-3294 - http://blog.realtors.org/crt
More information about the libRETS-users
mailing list