en
Bøger
Stephen Redmond

QlikView for Developers Cookbook

  • Eddie Wagthar citeretfor 7 år siden
    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 Wagthar citeretfor 7 år siden
    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
Træk og slip dine filer (ikke mere end 5 ad gangen)