Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
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!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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'

tresesco
MVP
MVP

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.

tresesco
MVP
MVP

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!