Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Valued Contributor II

using Macro excu Store Procedure in qlikview

While using below script is successfully inserting those i given parameters into Sql sever database ie store procedure that fine my question is that How To get values of the Database ? and if we Get where it will store and how to do that?


sub Trigger

Set conn = CreateObject("ADODB.Connection")

Set rs = CreateObject("ADODB.Recordset")

' String connection

strConn = "Connection Name"

' Open the connection

conn.Open strConn

parameter1= date1

parameter2= date2

' Execute the stored procedure

sqlQuery = "EXEC [dbo].[GetDatename]  '2013/11/1','2013/2/2','25' "

rs.Open sqlQuery, conn, adOpenForwardOnly

end sub

Tags (1)
2 Replies

Re: using Macro excu Store Procedure in qlikview

It is not possible to use a macro to load data into QlikView. You should do it in the load script instead, using

SQL EXEC [dbo].[GetDatename]  '2013/11/1','2013/2/2','25' ;

Read more here:How to pass variable to a SqlServer stored proc



Re: using Macro excu Store Procedure in qlikview

Hi Sunil,

Instead of macro try like this in Qlikview script, it returns the resultset and stores in a table


SQL EXEC [dbo].[GetDatename]  '2013/11/1','2013/2/2','25' ;

Hope this helps you.



Community Browser