Pulling Data from Oracle

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Pulling Data from Oracle

Postby oleviasharbaugh » Fri Dec 08, 2023 9:17 am

I'm in the process of updating old programs to include a direct connection to Oracle and have come across a small problem. I'm using the following command structure to pull in the data I need, then unstack it into a format that makes sense:

Code: Select all

pageload(type=odbc, timeout = 900) FilePath\OracleConnection.dsn "SQL code to pull the correct data" @keep *
pageunstack(page = Units, namepat=?_*) COMBOFIELD yearmo @ ?*


The issue I encounter is that the data is automatically pulled into a new page in Eviews called "Units". Even if I already have a "Units" page created, it will not put the data into the old page, but rather create a new one named "Units1" since "Units" is already taken. Is there a way to have the data go into a page that already exists using the pageunstack command?

For now, I am using a for loop to copy over the data into the original page, then delete the new page. However, some of the programs I need to update are pulling a lot of data and the process seems rather tedious. I'd love to find a more straightforward way to pull the data into the correct page in the first place.

Thanks in advance for any suggestions!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Pulling Data from Oracle

Postby EViews Gareth » Fri Dec 08, 2023 10:06 am

No, pageunstack needs to create a new page each time.
Follow us on Twitter @IHSEViews

oleviasharbaugh
Posts: 17
Joined: Thu Aug 24, 2023 9:42 am

Re: Pulling Data from Oracle

Postby oleviasharbaugh » Fri Dec 08, 2023 10:27 am

Okay. So in your opinion, would using a for loop to just copy those variables over to the desired page be the best way to do it?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Pulling Data from Oracle

Postby EViews Gareth » Fri Dec 08, 2023 11:03 am

yes.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 30 guests