4 Replies Latest reply: Jan 21, 2014 10:48 AM by Richard Benoit RSS

    Loading a Variable with an integer

      Hi all

       

      In my script I am loading a table 'tblSubList' but I am not interested in every record in this table, and loading every record adds time to the script.

       

      Earlier in the script I have another table 'tblCHI' that contains the ID numbers for the records I am interested in.

       

      Can I take the minimum ID from 'tblCHI' and use this in the WHERE clause for 'tblSubList'?  Or would a Left Join be just as efficient (as there may not be matching records in 'tblSubList').

       

      In SQL Server I would do something like

       

      @MinSysID = SELECT Min(SYS_ID) FROM tblCHI

       

      SELECT * FROM tblSubList WHERE SYS_ID >= @MinSysID

       

      Can a similar thing be done in QlikView?