Hi all,
Happy new year!
I'm working on a job that queries a sql server for data, uses the unstack command to create time series, then creates dated data (to eventually create weekly data).
The dataset I'm querying unfortunately has missing values across the entire set (where no records are returned with the corresponding date, not even a date). When copying from the unstructured page to the structured, dated page, eviews does not recognize these missing values/dates (understandably so, as there are not NA's or even dates to indicate that the data has missing obesrvation).
Is there anyway eviews can scan the date series that is created with the sql pull to know when the a date is being skipped and create an NA in the series, insert the missing date(s), and populate the series with NAs? The code and work file are below.
As always, thank you again for your kind help and expertise.
Bob
close @wf
%startrange="1/1/2011"
%endrange=@datestr(@dateadd(@dateval(@date),1,"m"),"mm/dd/yyyy")
wfcreate(wf=nukeqry) d7 %startrange %endrange
pagecreate(page=sql_qry) u 1
shell(out=nukeqry) type "c:\warem32\sqlnukeqry.txt"
%nukeqry = nukeqry(1,1)
wfclose
'import HDD data
wfopen(type=odbc, timeout=60, link, wf=nukeqry) "c:\temp\PL_Server" %nukeqry' d7 %startrange %endrange
series date = @dateval(nukedate,"yyyy-mm-dd")
pageunstack(namepat=*?) seriesid date @ *
pagecreate(page=daily) d7 %startrange %endrange
copy untitled1\*nuke* daily\*nuke*
copy unstructured to structured dated page, with missing values
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
copy unstructured to structured dated page, with missing values
- Attachments
-
- nukeqry.wf1
- (28.38 MiB) Downloaded 143 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: copy unstructured to structured dated page, with missing values
Can't tell from your code or your file exactly what you're trying to do, but it sounds like you're bringing data into an unstructured page. You could just copy it to a regular frequency page, using dates to do the match merge?
Follow us on Twitter @IHSEViews
Re: copy unstructured to structured dated page, with missing values
Hi, and thanks for the quick reply.
That is exactly what I'm trying to do. How do I use the dates series to do the match merge?
Thanks!
Bob
That is exactly what I'm trying to do. How do I use the dates series to do the match merge?
Thanks!
Bob
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: copy unstructured to structured dated page, with missing values
Code: Select all
pageselect nameofdailypage
series date = @date
copy nameofunstructuredpage\nameofseries nameofdailypage\nameofseries @src date @dest date
Follow us on Twitter @IHSEViews
Re: copy unstructured to structured dated page, with missing values
Perfect! Thank you so much!
Who is online
Users browsing this forum: No registered users and 38 guests