Beruflich Dokumente
Kultur Dokumente
CREATE TABLE t1 (
key_1 INTEGER NOT NULL,
col_2 INTEGER NOT NULL,
col_3 TIMESTAMP NULL,
col_4 DECIMAL ( 11, 2 ) NULL,
col_5 VARCHAR ( 100 ) NULL,
PRIMARY KEY ( key_1 ) );
Tip: Watch out for operating system permissions when specifying a file specifi-
cation in LOAD TABLE. For example, if the database engine is run as a Windows
service it may or may not have sufficient privileges to read the file.
The LOAD TABLE input file specification must be a string literal, not a vari-
able. If you want to use a variable, run LOAD TABLE via EXECUTE
IMMEDIATE. The following example puts the file specification in a variable
called @filespec and then builds the LOAD TABLE command in another vari-
able called @sql before running it via EXECUTE IMMEDIATE. This time,
sadly, each single backslash in \\TECRA\TecraC\temp\t1_c.txt must be repre-
sented as four backslashes.
BEGIN
DECLARE @filespec VARCHAR ( 1000 );