Zoomed Image

AMSX Scripting Language - Command : FileToTempTable

Summary

Load a file into a temporary database table

Description

Reads an XML, tab-separated, or comma-separated file and inserts its contents into a temp table. For delimited files the first row must contain column names. Use quoting option 2 when tab-separated data has blank leading fields that the MS parser would otherwise truncate. File must be within a permitted folder.

Parameters

ParameterDescription
cmdfull path to the source file
Argument 0temp table name to create and populate
Argument 1file format: TAB, COMMA, or blank for XML
Argument 2DEBUG to enable row-by-row debug mode for diagnosing bad XML records
Argument 3quoting: 0 = data is not quoted, 1 = data is already quoted, 2 = quote data before parsing
Argument 4character encoding: utf8 (default) or ascii

Syntax


FileToTempTable "full path to the source file", "temp table name to create and populate", "file format: TAB, COMMA, or blank for XML", "DEBUG to enable row-by-row debug mode for diagnosing bad XML records", "quoting: 0 = data is not quoted, 1 = data is already quoted, 2 = quote data before parsing", "character encoding: utf8 (default) or ascii"

Return to the AMSX Command Reference