5 Replies Latest reply: Jan 24, 2013 10:12 AM by Tobias Gusinde RSS

    Transfer Values into variable (peek)

      hello all,


      I've got a Problem using a variable in QV-Script.


      My plan was to load a bunch of names from a txt file and then search for entrys in a large table via SQL with this name. I tried to transfer the selected names into a variable with a peek. But the variable only shows the last value of the list of names.


      Hope someone can help me out.


      My script:



      LOAD names



      (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);


      Let vNumberOfRows = NoOfRows('Namen');

      For vZ = 0 to (vNumberOfRows - 1)

      Let vNAMES = Peek('names',vZ,'Namen');

      Let [$(vNAMES)] = Peek('names',vZ,'Namen');



      And then the select in the large table:


      LOAD *;

      SQL SELECT *

      FROM "xxx.xxxx"

      WHERE names in ('$vNAMES');


      Hope you can help me out.