Literals for 5800 System Data Types
For each 5800 system data type, there is a syntax to include literals of that type in a query string.
The syntax is {type_name ’stringliteral’}. For example, consider the query:
timestamp_field<{timestamp ’2006-10-26T12:00:00Z’}
In particular, this syntax can be used to query for a particular object ID:
system.object_id = {objectid
’0200011e61c159bdfa654e11db8a45cafecafecafe000000000200000000’}
For comparing against binary values, either of the following forms may be used:
binary_field = x’beeffeed’
binary_field = {binary ’beeffeed’}
For more information, see
“Canonical String Format” on page 119.
Canonical String Format
Each type in a 5800 system has a canonical representation as a string value. The canonical
string representation of each type is shown in
Table 4–1.
TABLE 4–1 Canonical String Representationof Data Types
DataType CanonicalStringRepresentation
STRING Thestring itself.
CHAR The string itself.
BINARY Hexadecimal dumpof the value with two hexdigits per byte.
LONG Result of Long.toString. For example, 88991or -7975432785.
DOUBLE Resultof Double.toString. For example,1.45 or NaN or -Infinity or-1.56E200.
DATE YYYY-mm-dd. Forexample, 2001-01-01.
TIME HH:mm:sss. Forexample, 12:02:01.
TIMESTAMP YYYY-mm-ddThh:mm:ss.fffZ (time relative to UTC).For example,
1969-12-31T23:59:59.999Z.
OBJECTID 60-digit hexadecimal dumpof the objectid.
This canonical string encoding is used in the following places:
■
When exposing the eld as a directory component or a lename component in a virtual view
CanonicalStringFormat
Chapter4 • SunStorageTek 5800SystemQuery Language 119