beautypg.com

Considerations for character data – HP Neoview Release 2.5 Software User Manual

Page 78

background image

— To qualify by double-quotes (""):

optionally qualified by "

— To qualify by single-quotes (""):

optionally qualified by '

Considerations for Character Data

For Load Operations:
— Character fields can include any characters valid for the character set of the target data

type.

— If an input field has fewer characters than the target column for target data type CHAR,

values written to the target table are padded with trailing spaces. This does not apply
to VARCHAR.

— If the length of a character input value used in an SQL expression or written to a database

column exceeds the length of the expected data type, the additional characters are
truncated. If the additional characters are not all white space, the record is rejected and
written to the

“faileddatafile” (page 58)

file. If the additional characters are white space,

processing continues normally.

— Most SQL expressions that accept character values as input expect the values to be of

type CHAR(255). If your input value for a field can exceed this length, use a CAST
expression to increase the maximum expected length. For example, for a field called
FIELD_1:

substring(CAST(:FIELD_1 as CHAR(512)), 2, 10)

For Extract Operations:
— For fixed-width format, if a character field written to a target file or named pipe exceeds

the specified number of bytes, and the additional characters are all white space, they
are discarded and processing continues. If the additional characters are not all white
space, the record is rejected and written to the

“baddatafile” (page 53)

file.

78

Data Processing