Quantcast
Channel: EViews
Viewing all articles
Browse latest Browse all 24140

Using variables in Stored Procedures

$
0
0
I am trying to use ODBC to get data to Eviews from an SQL database, so I can continue to work on it in Eviews. The full code is enclosed below, with uid and pwd for the ODBC source changed.

Code:
Mode Quiet
Close @All
%per = "1502"
%perSQL = "20" + @Left(%per,4)
%per2 = "20" + @Left(%per,2) + "m" + @Right(%per,2)

WfCreate(page=m) TestODBC m {%per2} {%per2}

%dbcred = "dsn=Dbutv;uid=eviews;pwd=eviews"

PageLoad(type=odbc,page=Utskick) {%dbcred} "{call BearbetningHamtaUtskick (@sPeriod='201502', @sSektor='G')}"


I would like to be able to use %perSQL instead of the hard coded 201502 within the call part of the PageLoad at the bottom.



Viewing all articles
Browse latest Browse all 24140


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>