Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
alex_nerush
Contributor 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
Honored Contributor III

Re: DIRECT DISCOVERY, SQL() and stored procedures execution

Can u please setting with attached jpg and test.

Vikas

Re: DIRECT DISCOVERY, SQL() and stored procedures execution

Alex

That is quite cunning,

It reminds me of the Sql Injection hacking method.

Best Regards,     Bill

Community Browser