Hi Guys,
I basically want to fetch data from a previous database I have created, rename my forecasts to historical data, then overwrite the previous historical data (which had the same name) Here is the code:
fetch(d=forecast_updaug13_c{%country}) *
copy *_f *_t
rename *_t *
However, I keep getting the error "Variable X" already exists in "Rename *_t *"
Ultimately I just want to fetch all the data in my db and rename anything with _f (e.g. example_f) to without the _f (e.g. example) however, the variable "example" here already exists in the database I'm reading in and it wont let me overwrite it. I would try just fetching the _f data but I need some variables which aren't _f to complete my modelling.
Hope this makes sense, my english isn't the best I know!
Fetching data and overwriting existing data
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Fetching data and overwriting existing data
You'll have to delete the existing ones first.
Re: Fetching data and overwriting existing data
eugh! Was afraid of that. Is there any way to delete something only if it exists? If not, don't delete?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Fetching data and overwriting existing data
The delete command has an option to do that:
Code: Select all
delete(noerr) objname
Who is online
Users browsing this forum: No registered users and 1 guest
