0
ODBC CONNECT TO database_name;
SQL
EXEC procedure_name arg_1, arg_2

I use above code in Qlikview to retrieve the return tables from SQL Server. However, there are three tables returned from the procedure. Qlikview shows only one table and its columns.

How to retrieve more than one tables from a procedure?

Thank you very much!

Carl Zheng
  • 708
  • 2
  • 6
  • 20
  • Are the three tables results have same number columns and datatypes ? If yes, then insert the three select results into a temp table and select he temp table in stored procedure – Pரதீப் Nov 01 '16 at 15:32
  • maybe this post will be help you https://community.qlik.com/thread/175034 – Byron Nov 01 '16 at 15:33
  • @Prdp No. the three tables are totally different. – Carl Zheng Nov 01 '16 at 15:33
  • I don't know qlikview, but here's a c# example, hope it helps: http://stackoverflow.com/a/7239492/95710 – DForck42 Nov 01 '16 at 15:35
  • @Byron I have checked this. It seems they used different procedures.I have to use one procedure, but Qlikview only could find out the first returned table. – Carl Zheng Nov 01 '16 at 15:35
  • I'm wondering.... How can a Stored Procedure return three different results sets...? Did you try invoking the procedure manually? – FDavidov Nov 01 '16 at 15:42
  • Qlik likes SPs in a certain format, check out my blog post on it .. http://oneqlikatatime.blogspot.co.uk/2016/05/how-to-write-sql-stored-procedures-for.html – Chris J Nov 01 '16 at 15:44
  • Post the code of the actual procedure... you have fell into the XY problem, again, that i mentioned in your previous question: http://stackoverflow.com/q/40350115/6167855. Read this, please: http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem – S3S Nov 01 '16 at 16:06

1 Answers1

0

The query results are returned as a multiple result set. The documentation below may help you navigate a multiple result set from Sql server using qlik.

Using multiple result sets served by SQL Server stored procedures

Ross Bush
  • 14,648
  • 2
  • 32
  • 55