Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a requirement to store the table contents into csv files if they have data. Everyday the file gets overwritten.\
Table:
LOAD * Resident Temp;
if NoOfRows('Table')>0 then
STORE Table into Table.csv(txt);
end if
If there is data in the table today, the file gets created but what if I do not have data tomorrow. The file would still be there in the folder. Is there anything I can do to check if file existed and delete before creating a new one?
You could include the following in your logic:
if filesize('Table.csv') > 0 then
EXECUTE cmd.exe /C del Table.csv;
end if
- Marcus
You could include the following in your logic:
if filesize('Table.csv') > 0 then
EXECUTE cmd.exe /C del Table.csv;
end if
- Marcus
Thank you!