Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

0 lines fetched

Hi All,

when reloading the below script last three lines, meant to create seperate tables for different AccTypes, get 0 lines. Why?

DBS:

SELECT DB_Name FROM Configuration

AccountType:

LET NumberOfDBS = NoOfRows('DBS');

FOR i=0 TO $(NumberOfDBS)-1

LET DB_Name = Peek('DB_Name', $(i), 'DBS');

SELECT

'$(DB_Name)' AS DB_Name,

CASE WHEN Com_Value = 1 THEN 'ER' WHEN Com_Value = 2 THEN 'KP' WHEN Com_Value = 3 THEN 'KH' END AS AccType

FROM CDN_$(DB_Name).CDN.Company;

NEXT

DBS_ER: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 1;

DBS_KP: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 2;

DBS_KH: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 3;

Regards,

Przemek

Tags (2)
1 Solution

Accepted Solutions

0 lines fetched

Hi,

     Here Your account type would be

     'ER' or 'KP' or 'KH'

DBS_ER: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType =

'ER';

DBS_KP: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 'KP';
DBS_KH: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 'KH';

Celambarasan

2 Replies

0 lines fetched

Hi,

     Here Your account type would be

     'ER' or 'KP' or 'KH'

DBS_ER: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType =

'ER';

DBS_KP: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 'KP';
DBS_KH: NoConcatenate LOAD DB_Name, AccType Resident AccountType Where AccType = 'KH';

Celambarasan

Not applicable

0 lines fetched

Of course, thank you :-)

Community Browser