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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calling a stored procedure via an If statement

Hi Guys,

I'm after some help calling a stored procedure via an if statement in the load script.

In isolation SQL EXEC dbo.sp_add_log 1, 'Qlikview-Agent Performance', 'procedure started' works fine but I only want it to run when the if statement is fulfilled (ie document path starts C;\QV_)

When the if statement is not fulfilled, I'd want to bypass this stored procedure call and go on to run the rest of the script starting on the next tab. This just stops if the document path does not start C:\QV_

What am I missing?

if left(DocumentPath(),6) = 'C:\QV_' then

SQL EXEC dbo.sp_add_log 1, 'Qlikview-Agent Performance', 'procedure started';

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Don't worry..Sorted it!

if left(DocumentPath(),6) = 'C:\QV\' then

SQL EXEC dbo.sp_add_log 1, 'Qlikview-Agent Performance', 'procedure started';

end if

Missed the End If.

View solution in original post

1 Reply
Not applicable
Author

Don't worry..Sorted it!

if left(DocumentPath(),6) = 'C:\QV\' then

SQL EXEC dbo.sp_add_log 1, 'Qlikview-Agent Performance', 'procedure started';

end if

Missed the End If.