en
Книжки
Stephen Redmond

QlikView for Developers Cookbook

  • Eddie Wagtцитує7 років тому
    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цитує7 років тому
    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
Перетягніть файли сюди, не більш ніж 5 за один раз