Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Problem In Hard Code

Dear Team,

I am facing some problem on doing Hard Coding in Qlikview.

I am able to Hard Code in the scrip if I am importing the Excel data in Qlik View ,but when I Hard Code in the Script which is connected to the database I got error, Please tell me the right way to hard code.

Please find the attachment for details.

Regards,

Him

1 Solution

Accepted Solutions

Problem In Hard Code

Hi,

     If loop cann't be used in SQL SELECT Try this

     Load *,if(New_LeadCategory=1,'aaa','NewLeadCategory') as New_LeadCategory_1;

     SQL Select

               .

               .

               .

     From datasource;

Note:Remove the if loop in the SQL Select

Celambarasan 

4 Replies

Problem In Hard Code

Hi,

     If loop cann't be used in SQL SELECT Try this

     Load *,if(New_LeadCategory=1,'aaa','NewLeadCategory') as New_LeadCategory_1;

     SQL Select

               .

               .

               .

     From datasource;

Note:Remove the if loop in the SQL Select

Celambarasan 

Not applicable

Problem In Hard Code

Dear Celambarasan,

Thanks for the reply,Plz tell me the expression if  i have to print


New_LeadCategory=1 then aaa ,

New_LeadCategory=2 then bbb and

New_LeadCategory=3 then ccc  for the same below  line..


{{ Load *,if(New_LeadCategory=1,'aaa','NewLeadCategory') as New_LeadCategory_1;}}}

Regards,

Him



Problem In Hard Code

Hi,

     Change the if loop to

     if(New_LeadCategory=1,'aaa',if(New_LeadCategory=2,'bbb',if(New_LeadCategory=3,'ccc')))

Celambarasan

Not applicable

Problem In Hard Code

thanks...