Object exists in database
Posted: Tue Jun 09, 2009 9:49 am
by javiersan
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
Re: Object exists in database
Posted: Tue Jun 09, 2009 9:52 am
by EViews Gareth
Unfortunately not.
Re: Object exists in database
Posted: Tue Aug 02, 2011 1:13 am
by Joe
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