Object exists in database

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Object exists in database

Postby javiersan » Tue Jun 09, 2009 9:49 am

Hi,

is there a function like @isobject() that allows to know whether an object exists in a database without having to fetch it?

Thanks,

Javier

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

Re: Object exists in database

Postby EViews Gareth » Tue Jun 09, 2009 9:52 am

Unfortunately not.

Joe
Posts: 1
Joined: Tue Jul 19, 2011 7:15 am

Re: Object exists in database

Postby Joe » Tue Aug 02, 2011 1:13 am

Hi Janvier,

The following example might help your question. My databse name is XYZ which stores series with name like EST.GGINTR, EST.IRL etc. but some series do not exist in my database. So I use a combination of @wlookup and @wintersect to serve like @isobject. An example of the code is below.

Code: Select all

!row=1 table(!row,100) results 'create a table to store the result %object_list = @wlookup("XYZ::*") 'get a full list of object names from the XYZ databases for %country EST ISL ISR KOR LUX SVN SVK for %variable GGINTR IRL GDP IRS GNFL 'a list of variable of interest %my_string_{!row} = @wintersect(%country + "." + %variable, %object_list) 'check any intersect between my variable of interest and the full list if %my_string_{!row} <> "" then setcell(results, 1,1,"exists outputs") table results(!row+1,1) = %my_string_{!row} + " exists" endif !row = !row + 1 next next
Hope this helps.

Joe


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest