Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
Luminary Alumni
Luminary Alumni

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.