Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone. I have some requirement, Please help me out.
From one table I need to create 12 qvds monthly basis. Then one more requirement , When I load these qvds only updated month qvds will load instead of all qvd load.
Thanks,
Deb
You can specify the condition where while creating QVD in QVD generator , Please post some sample to give
resolution.
regards
Vikas
Yeah you can do that by giving the date directly.
For example - 01-01-2018 to 31-01-2018
similarly for every month
Hi,
Perhaps on every STORE statement, you should have a unique identifier.
Something like STORE <table> into <Dir>/<table>_<date or number> . This should be incremental. I would prefer to use date so that when you write a load statement, you can use the name of the latest qvd that you want. The identifier can be stored as a variable to make things a bit easier
Please follow the below script..
GetUniqueCode:
NoConcatenate
Load Distinct [YourCode] as Your_Code
From ABC;
Drop Table ABC;
For vRow = 1 to NoOfRows('GetUniqueCode')
Let MyVar = Peek('Your_Code',vRow-1,'GetUniqueCode');
Set TableName = '$(MyVar)';
EXPORT_TABLE:
Load
Column1,
Column2,
Column3,
Column4
FROM YourPathandTableName Where YourCode = '$(TableName)';
Store EXPORT_TABLE into YourPath\Exporting_Table_$(TableName).qvd](qvd);
Drop Table EXPORT_TABLE;
Set MyVar = Null();
Set TableName = Null();
Next
Drop Table GetUniqueCode;
Please follow the below script..
GetUniqueCode:
NoConcatenate
Load Distinct [YourCode] as Your_Code
From ABC;
Drop Table ABC;
For vRow = 1 to NoOfRows('GetUniqueCode')
Let MyVar = Peek('Your_Code',vRow-1,'GetUniqueCode');
Set TableName = '$(MyVar)';
EXPORT_TABLE:
Load
Column1,
Column2,
Column3,
Column4
FROM YourPathandTableName Where YourCode = '$(TableName)';
Store EXPORT_TABLE into YourPath\Exporting_Table_$(TableName).qvd](qvd);
Drop Table EXPORT_TABLE;
Set MyVar = Null();
Set TableName = Null();
Next
Drop Table GetUniqueCode;
You can use this subroutine: Subroutines in load script
Readability will be high, and minimum code modification needed.
Tomasz