Books
Stephen Redmond

QlikView for Developers Cookbook

  • Eddie Wagt has quoted7 years ago
    Let i = 1;
    Do While i <= NoOfFields('MyTable')
    Trace Getting Field $(i) From MyTable;

    Let FieldName = FieldName($(i), 'MyTable');

    Trace FieldName = $(FieldName);

    If '$(FieldName)' Like 'F*' Then
    Let Command = 'Drop Field [$(FieldName)];';
    $(Command)
    Trace Command = $(Command);
    Else
    Let Command = '';
    Let i=i+1;
    End If

    Loop
  • Eddie Wagt has quoted7 years ago
    How to do it...
    Follow these steps to create a subroutine to store QVD then drop a table:
    Before the load statement for Table1, add the following script:
    Sub StoreAndDrop(vTableName)
    Store [$(vTableName)] into [$(vTableName).qvd];
    Drop Table [$(vTableName)];
    End Sub
    After the Table1 load and before the Table2 load, add the following line of script:
    Call StoreAndDrop('Table1');
    After the Table2 load, add the following line of script:
    Call StoreAndDrop('Table2');
    Reload the script. There should be no data in the document and two QVD files should have been created in the same folder as the QVW file.
fb2epub
Drag & drop your files (not more than 5 at once)