<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks > Functions > Built-in Functions >


Previous pageReturn to chapter overviewNext page

Parses fixed-width fields and automatically converts them to the given SQL types.


FIXED_COLUMN_LOG_PARSE ( <string value expression>, <column description string expression> )

<column description string expression> := '<column description> [,...]'

<column description> :=

  <identifier> TYPE <data type> [ NOT NULL ]

  START <numeric value expression> [FOR <numeric constant expression>]



Parsing of binary files is not supported.

Starting position of column is 0. Column specifications for types DATE,TIME and TIMESTAMP support a format parameter allowing the user to specify exact time component layout. The parser uses the Java class java.lang.SimpleDateFormat to parse the strings for types DATE, TIME and TIMESTAMP. The Date and Time Patterns topic gives a full description and examples of timestamp format strings. The following is an example of a column definition with a format string:

"name" TYPE TIMESTAMP 'dd/MMM/yyyy:HH:mm:ss'



Several examples of FIXED_COLUMN_LOG_PARSE function use appears in the Log File Adapter topic of the SQLstream s-Server Integration Guide.

The example shows this function being specified as one of the OPTIONS in a CREATE FOREIGN STREAM command or within a SELECT STREAM statement in a CREATE VIEW command.

See also the REGEX_LOG_PARSE and similar topics in this guide.