Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Can anyone help with this please, I am really struggling.
I have a typical load script as below, that will only ever contain one row of data:
table:
LOAD 1,2,3,4,HOSTNAME
The hostname is a file path, example c:\file.csv or \\pcname\c$\file.csv
I am then trying to store the file,
store [table] into [$HOSTNAME] (txt, delimiter is '|');
Whenever the script is run, it should dynamically store the file, according to the folder/file location in the HOSTNAME field.
Can anyone help please, have trawled the forums for hours searching for an example that works.
Thanks
Hi,
try this:
FOR vCount = 0 to NoOfTables()-1
LET vTableName = TableName($(vCount));
STORE $(vTableName) INTO $(vTableName).qvd (qvd);
NEXT vCount
HTH
André Gomes
Thanks, how would I work that to my example, when I run this it calls the file "table" as thats the table name, but I want the file name to be the data contained within HOSTNAME table?
Really appreciate your help
OK,
maybe something like this:
Table:
LOAD 1,2,3,4,[HOSTNAME]
from yoursource;
LET vHostName = peek([HOSTNAME],0);
YourData:
LOAD * from yoursource;
STORE YourData into vHostName.qvd (qvd);
HTH
André Gomes