Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ksomosera10
Creator II
Creator II

Manipulate SQL Stored Proc. column on Qlikview scripting

Hi Everyone,

I need your help.

I have this Qlikview script to call SQL Stored procedure:

SQL EXEC [dbo].[usp_TimeLogs] '7/1/2017','7/31/2017'

Inside this contains columns like:

Active - which consists of '0' for not active and '1' for active

Timelogs - Duration of People

I need to manipulate columns or create another table from the generated by SQL Stored Procedure.

How can I do that on Qlikview script?

For example:

If Active == 1 then Timelogs

Else NULL

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

You could possibly try using preceding load like:

Load

          If( Active=1, Active) as Timelogs ;

<Your sql procedure facing command here>

View solution in original post

6 Replies
tresB
Champion III
Champion III

You could possibly try using preceding load like:

Load

          If( Active=1, Active) as Timelogs ;

<Your sql procedure facing command here>

ksomosera10
Creator II
Creator II
Author

Are you saying like this?

Load

          If( Active=1, Active) as Timelogs ;

SQL EXEC [dbo].[usp_TimeLogs] '7/1/2017','7/31/2017'

tresB
Champion III
Champion III

If the procedure execution alone gives the data in qlik, that should work.

ksomosera10
Creator II
Creator II
Author

Yup It works! but I only got the 'Timelogs' column after the load.

tresB
Champion III
Champion III

You have to include the other fields in load explicitly or '*' for all, like:

Load

          *,

          If( Active=1, Active) as Timelogs ;

SQL EXEC [dbo].[usp_TimeLogs] '7/1/2017','7/31/2017

ksomosera10
Creator II
Creator II
Author

Thanks it works!