Query
Reference Manual
Communicating Using Query
: Specifying the Data Field Delimiter
Specifying the Data Field Delimiter
When data is sent from a data server to Query, it is sent as a single data block. Each data field within the block is delimited by a special character; by default, this is the ~ (tilde) character. When Query receives the block, it uses the delimiter character to determine the points at which to split the data into individual fields. If the data includes the delimiter character
within
a text field, Query will split the data block at the wrong point.
For example, the data stored in the following fields:
Area
Catalytic Cracker
Plant
Reflux~Heater
Code
DES21142
would be received by Query, using the default ~ delimiter, as the data block
Catalytic Cracker~Reflux~Heater~DES21142
and would be split, incorrectly, into the fields
$!a[1]
Catalytic Cracker
$!a[2]
Reflux
$!a[3]
Heater
$!a[4]
DES21142
To prevent this effect, you can redefine the delimiter character to be any single character which is not used within any database field. To do so, use the command
EXTERnal DELImit
token
text_char
where
token
is the token for the communication channel which was supplied by a successful EXTERNAL OPEN command (and stored in the
token_var
variable) and
text_char
is the required data field delimiter character.
For example, the specification
EXTERNAL DELIMIT $!!MAINT ’&’
would cause the data block from the preceding example to be received as
Catalytic Cracker&Reflux~Heater&DES21142
which would be correctly split at the points identified by the & characters.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.