1 Reply Latest reply: Feb 5, 2014 11:28 PM by Shivendoo Kumar RSS

    Need guidance in writing Script in QVW (source is QVD) similar like Case Statement in SQL. Please below Query

    Shivendoo Kumar

      Hi All,

      Need guidance in writing Script in QVW (Where source is QVD) similar like Case Statement in SQL. Please below Query and modify below case statement.

       

      Section Access;  /* Start section access script */

      LOAD

      CASE WHEN [EMP NAME] IN ('SHIVENDOO KUMAR','RAM KUMAR')THEN 'ADMIN' ELSE 'USER' END AS ACCESS,

      [EMP NAME] AS USERID,

      [EMP NAME] AS PASSWORD,

      EMP_KEY AS _EMP_KEY

      FROM DIM_EMP_DATA.QVD (qvd);

       

      Section Application; /* End section access script */

       

      Another question I have in mind, in Above Section Query I have defined [EMP NAME] as USERID & PASSWORD. So If User Name is with White space like SHIVENDOO KUMAR , in this case will it work or not?