Hi,
I'm wondering if I can use a string variable when calling a SQL SP? I want the program to loop when it's fetching data for different dates.
Now I have:
wfopen(type=odbc) "tycheodbc" "{call spEXFGetClose ('2008-11-03')}" @keep *
where you enter the date manually each time
I want the program to do the analysis for X consecutive days, hence I would like to do something like:
%day_1= "2008-11-03"
%day_2= "2008-11-04"
...
%day_X= "2011-11-03"
for !i=1 to X
%day=%day_{!i}
wfopen(type=odbc) "tycheodbc" "{call spEXFGetClose ('{%day}')}" @keep *
next
where you don't have to enter the date and run the program manually X times.
/Maria
Macro variable in calling SQL SP
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Macro variable in calling SQL SP
Code: Select all
for !i=1 to X
%day=%day_{!i}
%command = """{call spEXFGetClose ('" + %day + "')}"""
wfopen(type=odbc) "tycheodbc" {%command} @keep *
next
Who is online
Users browsing this forum: No registered users and 1 guest
