Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alex_nerush
Partner - Creator II
Partner - Creator II

DIRECT DISCOVERY, SQL() and stored procedures execution

As you already know, DIRECT DISCOVERY allows to aggregate data at runtime using SQL-function in expressions. You can, for example, use following expression to find out maximux value for appropriate dimensions: SQL('MAX(some_column)'). But how about stored procedures execution? Something like this: SQL('EXEC MyStoredProcedure'). But such syntax is not allowed, i've go a message "Direct query failed" in my chart. After a while i've found solution and i would like to share idea here. Need to say, i've used MS SQL and following solution could be used with Microsoft SQL.

Here you are:

SQL('1 as Dummy; EXEC MyStoredProcedure; --')

2 Replies
vikasmahajan

Can u please setting with attached jpg and test.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anonymous
Not applicable

Alex

That is quite cunning,

It reminds me of the Sql Injection hacking method.

Best Regards,     Bill