How do I empty all entries of a table?
I would like to reset the table to be empty after each iteration. The following does not work in EViews 6:
table t=””
My solution is:
table t
delete t
table t
(I need the first line in order to avoid an error in the second line)
Any suggestion for better ideas?
Thanks,
Basile
cleaning a table
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: cleaning a table
Deleting the table is the only way to completely empty it.
Re: cleaning a table
thanks for your quick response.
Just a quick follow up: is there a way to use "delete t" without creating an error in case where t does not exit?
Just a quick follow up: is there a way to use "delete t" without creating an error in case where t does not exit?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: cleaning a table
In EViews 7 you can use:
In EViews 6, you're out of luck.
Code: Select all
delete(noerr) t
-
tchaithonov
- Posts: 168
- Joined: Mon Apr 13, 2009 7:39 am
- Location: New York City
Re: cleaning a table
Just do:
if @isobject("t")=1 then
delete t
endif
if @isobject("t")=1 then
delete t
endif
Who is online
Users browsing this forum: No registered users and 2 guests
