3 Replies Latest reply: Mar 30, 2015 4:17 PM by t h RSS

    Variable in a where statement?

    Steve Lord

      Hi, I have a vague idea that I'd like to include a variable that refers to a list of company names in my various load scripts' where statements.  This would make the script easier to maintain overall.  Does anyone have an example qvw or something they can share which does this?  Script below is wrong I'm sure, just a vague illustration of the concept I'm thinking of.


      //some script that sets up a list of values to be included in the variable//

      Let vClients = match(ClientName, 'Acme', 'ABC', '123', 'S-Mart')


      //then some load script like below maybe//


      Load UserId,



      FROM Data\Users.qvd where match(ClientName, $(vClients));



      Load UserId,



      FROM Data\Registrations.qvd where match(ClientName, $(vClients));



      Load UserId,



      FROM Data\Attendance.qvd where match(ClientName, $(vClients));


      Thanks in advance!