SQL Output Format Column Type Mappings

Log Parser

SQL Output Format Column Type Mappings

The following table shows the mappings between the data types of the query output record fields and the SQL types of the columns in the target table.

The column labeled "New Table" shows the SQL types declared for the table columns when the SQL output format creates the table.
The column labeled "Existing Table" shows the SQL types that are compatible with the corresponding Log Parser data type when the SQL output format uploads records to an existing table.

Log Parser Data Type New Table Existing Table
INTEGER int int, bigint, smallint, tinyint, bit1
REAL real real, decimal, float
STRING varchar(n2) varchar(n), nvarchar(n), char
TIMESTAMP datetime datetime, smalldatetime, date, time
NULL varchar any type

Notes:
(1): when uploading to a field of the bit type, the target value is set to true when the INTEGER value is different than zero, and to false when the value is NULL or zero.
(2): the maximum length of new fields of the varchar type can be controlled through the maxStrFieldLen parameter.


© 2004 Microsoft Corporation. All rights reserved.