Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have 20 tables. I Have to create them into QVD'S. I don't want to write store command for each & every table. Is there any way to create qvd's for all the 20 tables at a time.
Thanks in advance
Madhu
Hi Madhu,
Did you get the useful info?
You could use a loop like this:
for i = 1 to NoOfTables() - 1
let t = TableName($(i));
store [$(t)] into [$(t).qvd] (qvd);
next
But often it's better to store (and drop) a table at that moment that they is created and not to store all tables before finishing the reload-script then in this case all tables remain into the RAM until the end. For this you could use a sub-statement like this:
sub StoreAndDrop(vTableName, vSuffix, vQVDFolder, vDrop)
store [$(vTableName)] into [$(vQVDFolder)\$(vTableName)$(vSuffix).qvd] (qvd);
if '$(vDrop)' = 'drop' then
drop table [$(vTableName)];
end if
end sub
call StoreAndDrop('YourTable', '', '.\', 'drop')
- Marcus