Check if series exists in database

For questions regarding programming in the EViews programming language.

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

dravenous
Posts: 31
Joined: Thu Jan 29, 2015 2:30 pm

Check if series exists in database

Postby dravenous » Thu May 24, 2018 11:08 am

Is there an efficient way to check if a series exists in a database and then if it doesn't have eviews look in a different database?

if "series" exists in db1 then fetch it
if not fetch from db2

something like that?

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

Re: Check if series exists in database

Postby EViews Gareth » Thu May 24, 2018 12:37 pm

Only with using the query command
Follow us on Twitter @IHSEViews

dravenous
Posts: 31
Joined: Thu Jan 29, 2015 2:30 pm

Re: Check if series exists in database

Postby dravenous » Thu May 24, 2018 1:10 pm

That actually helped a lot, thanks gareth. I was able to use @wquery to achieve what I needed. This is unrelated, but when you are using logmsg to post messages, is there anyway to force them all into one line. For example

logmsg Hi
logmsg my
logmsg name
logmsg is
logmsg Fred

to display as

"Hi my name is Fred" opposed to

Hi
my
name
is
Fred

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

Re: Check if series exists in database

Postby EViews Gareth » Thu May 24, 2018 1:37 pm

Only by putting them into one string then sending that one string to logmsg
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 11 guests