Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'd like to assign table names and source files to variables and use it throughout my load script. Like so..
SET vSourceFileName0 = 'source_file_1.csv';
SET vSourceFilePath0 = 'C:\my files\Sept2013\';
SET vSourceTableName0 = 'MS_SQL_table_1';
MySQLTable:
SQL SELECT * FROM vSourceTableName0;
MyFileSource:
LOAD *
FROM
vSourceFilePath0 & vSourceFileName0
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, no eof);
Doesn't seem to be working...
Hi,
SET vSourceFileName0 = 'source_file_1.csv';
SET vSourceFilePath0 = 'C:\my files\Sept2013\';
SET vSourceTableName0 = 'MS_SQL_table_1';
MySQLTable:
SQL SELECT * FROM $(vSourceTableName0);
MyFileSource:
LOAD *
FROM
$(vSourceFilePath0)$(vSourceFileName0)
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, no eof);
Regards,
Aurélien
Hi,
Try to retrieve the variable value with $(vSourceFileName0)
Hi,
SET vSourceFileName0 = 'source_file_1.csv';
SET vSourceFilePath0 = 'C:\my files\Sept2013\';
SET vSourceTableName0 = 'MS_SQL_table_1';
MySQLTable:
SQL SELECT * FROM $(vSourceTableName0);
MyFileSource:
LOAD *
FROM
$(vSourceFilePath0)$(vSourceFileName0)
(txt, codepage is 1252, embedded labels, delimiter is ',', msq, no eof);
Regards,
Aurélien