Difference between revisions of "SET CSVHEADING"

From Lianjapedia
Jump to: navigation, search
(Created page with "==Purpose== Enable or disable the inclusion of field name headings in COPY TO ... TYPE CSV exports ==Syntax== SET CSVHEADING ON | OFF | (<expL>) ==See Also== APPEND FROM...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Enable or disable the inclusion of field name headings in COPY TO ... TYPE CSV exports
+
Enables or disable the inclusion of field name headings in COPY TO ... TYPE CSV exports
  
 
==Syntax==
 
==Syntax==
Line 9: Line 9:
  
 
==Description==
 
==Description==
The SET CSVHEADING set command works in conjunction with the COPY TO ... TYPE CSV command.  If SET CSVHEADING is ON (default), the first line of the csv text file created will be the field names.  If SET CSVHEADING is OFF, the field names will be omitted.  
+
The SET CSVHEADING set command works in conjunction with the COPY TO ... TYPE CSV and APPEND FROM ... TYPE CSV commands.  If SET CSVHEADING is ON (default), the first line of the csv text file created / opened will be the field names.  If SET CSVHEADING is OFF, the first line is the first data record.
  
 
==Example==
 
==Example==

Latest revision as of 09:16, 30 October 2013

Purpose

Enables or disable the inclusion of field name headings in COPY TO ... TYPE CSV exports

Syntax

SET CSVHEADING ON | OFF | (<expL>)

See Also

APPEND FROM, COPY, COPY FILE, COPY STRUCTURE, COPY STRUCTURE EXTENDED, DECRYPT, ENCRYPT, SET FILTER, SET XMLFORMAT

Description

The SET CSVHEADING set command works in conjunction with the COPY TO ... TYPE CSV and APPEND FROM ... TYPE CSV commands. If SET CSVHEADING is ON (default), the first line of the csv text file created / opened will be the field names. If SET CSVHEADING is OFF, the first line is the first data record.

Example

open database southwind
use products
set csvheading off
copy to exportproducts type CSV delimited with '|'
type exportproducts.csv