Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
CELAMBARASAN
Partner - Champion
Partner - Champion

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 

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

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
Author

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



CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Change the if loop to

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

Celambarasan

Not applicable
Author

thanks...