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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist 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?

//Macro

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

2 Replies
hic
Former Employee
Former Employee

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

HIC

jagan
Partner - Champion III
Partner - Champion III

Hi Sunil,

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

TableName:

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


Hope this helps you.


Regards,

Jagan.