Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
wgonzalez
Partner - Creator
Partner - Creator

Dynamically creating a qvd file name.

Hi,

I want to dynamically create a qvd file name in the script, i.e. I want the qvd file name to be different each time it is created.

I'm using these script instructions that are not working, but I think I'm near to find the solution.  Could any one provide ideas?

 

// Save all employees to QVD file.
// Saves headcount for the particular month.

SET  vTableName = 'viewEmployee';

LET vMonthDay = Month(Today())&day(Today());
LET vFilename = $(vTableName)&$(vMonthDay);
$(vTableName):
LOAD id,
today() as EffectiveDate,
month(today());
SQL SELECT *
FROM "mydatabase".dbo.viewEmployee;

store * from $(vTableName) into $(vRoot)Extracts\$(vFilename).qvd;
drop table $(vTableName);

1 Reply
MayilVahanan

Hi

Use Now() instead of

Month(Today())&day(Today())

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.