Type conversion

Fields of source tables can belong to compound type. For these fields you must convert their values to a certain type.

<Type conversion>
      |
      CAST ( <Expression>, AS, <Value typegt; )
                                                    |
                                                    BOOLEAN |
NUMBER [(Length[, Precision])]|
STRING [(Length)] |
DATE |
<Table name>
                                                                 <Lenght> - NUMBER; <Precision> - NUMBER

<Expression> is converted to one of the primitive types or to a reference data type; in the latter case, <Table name> refers to the corresponding infobase table.

If the <Expression> contains the required <Value type> within the compound type, then type conversion is possible, and for each value of the specified type the result will be the value itself. For values of other types, the result of type conversion will be NULL.

If an <Expression> does not contain the required <Value type>, query execution will fail because the type conversion is impossible.

For a STRING <Value type> with length specification, maximum length of a string is 1024.

See also: Use of Expressions in the Query Language

1C:Enterprise Developer's Community