INTO

Log Parser

INTO

<into_clause> ::= INTO <into_entity>

The INTO clause is used to specify the output format target(s) to which the query output records are to be written.


Remarks:

  • The syntax and interpretation of the <into_entity> specified in the INTO clause depends on the output format used. For information on the syntax and interpretation of the <into_entity> values supported by each output format, refer to the Output Formats Reference.
  • Regardless of the output format used, the <into_entity> specified in the INTO clause must comply with the following general syntax:
    • The <into_entity> can not contain spaces, unless it is enclosed by the ''' (single quote) or '" (double quotes) characters, as in the following example:
      'C:\Program Files\file3.txt'
      
    • The following characters are considered parenthesys characters, and if they appear in an <into_entity>, they must appear as well-formed pairs of opening and closing parenthesys:
      < > ( ) [ ] { }
      The following examples show valid into-entities containing parenthesys characters:
      entity<value>
      entity[value]value
      
      The following examples show invalid into-entities containing parenthesys characters:
      entity>value<
      entity}value
      entity(value
      
  • Any character (including illegal characters and non-printable characters) in an <into-entity> can be entered using the \uxxxx notation, where xxxx is the 4-digit hexadecimal representation of the UNICODE character, as in the following example:
    C:\Program\u0020Files\file3.txt
    
  • Into-entities that represent names of files or directories are not allowed to contain the following characters, even when enclosed in quote characters or entered using the \uxxxx notation:
    tab carriage-return line-feed , ( ) " < >
  • Since the INTO clause is not a mandatory clause in the Log Parser SQL-Like language, most output formats employ default <into_entity> values that are implicitly used when a query does not include an INTO clause.
    For example, the NAT, CSV, and TSV output formats assume STDOUT when an INTO clause is not specified. For more information on the default <into_entity> values assumed by each output format, refer to the Output Formats Reference.
  • The TO clause used by earlier versions of Log Parser has been deprecated in favor of the INTO clause.


Examples:

A. Explicit <into_entity>

The following example query specifies an explicit target CSV file for the CSV output format:
SELECT *
INTO MyOutput.csv
FROM System

B. Implicit <into_entity>

The following example query uses an implicit STDOUT target for the NAT output format:
SELECT *
FROM System

C. Explicit <into_entity>

The following example query specifies an explicit STDOUT target for the NAT output format:
SELECT *
INTO STDOUT
FROM System


See also:

FROM

Basics of a Query
Output Formats Reference


© 2004 Microsoft Corporation. All rights reserved.