由买买提看人间百态

topics

全部话题 - 话题: 098766
(共0页)
g****n
发帖数: 18
1
来自主题: Statistics版 - Use SAS to fill in missing values?
Fill the missing values by repeating the values from the above non-missing
rows.
For example, before the filling the data look like
3270001111111 098766 7/31/2007 check 40000
3270001111111 098766 8/31/2007 .
3270001111111 098766 9/30/2007 IT 135000
3270001111111 098766 10/31/2007 .
3270001111111 098766 11/30/2007 .
3270001111111 098766 12/31/2007 .
3270001111111 098766 1/31/2008 .
3270001111111 098766 2/28/2008 book 75000
3270001111111 098766 3/31/2008 .
3270001111111 098766 4/30/2008 .
Then aft
g****n
发帖数: 18
2
来自主题: Statistics版 - Use SAS to fill in missing values?
Hello,
I have a question on using SAS or SQL to fill in some missing values in a dataset
from the above row, assuming the data are arranged in ascending order by
Date?
ID New_ID Date CV Value
3270001111111 098766 7/31/2007 check 40000
3270001111111 098766 8/31/2007 .
3270001111111 098766 9/30/2007 IT 135000
3270001111111 098766 10/31/2007 .
3270001111111 098766 11/30/2007 .
3270001111111 098766 12/31/2007 .
3270001111111 098766 1/31/2008 .
3270001
g****n
发帖数: 18
3
Hello,
I have a question on using SQL to fill in some missing values in a dataset?
Right now my dataset look like this
ID New_ID Date CV Value
3270001111111 098766 7/31/2007 check 40000
3270001111111 098766 9/30/2007 check 135000
3270001111111 098766 2/28/2008 check 75000
Note there is no date for 8/2007, 10/2007, 11/2007, 12/2007, and 1/2008. I
want to fill in those blanks with the data from previous month, making it
looks like the
B*****g
发帖数: 34098
4
ORACLE
WITH
DATA_TABLE AS
(SELECT 3270001111111 ID,'098766' NEWID,TO_DATE('07/31/2007', 'mm/dd/yyyy')
A_DATE,'check' CV,40000 A_VALUE FROM DUAL
UNION ALL
SELECT 3270001111111,'098766',TO_DATE('09/30/2007', 'mm/dd/yyyy'),'check',
135000 FROM DUAL
UNION ALL
SELECT 3270001111111,'098766',TO_DATE('02/28/2008', 'mm/dd/yyyy'),'check',
75000 FROM DUAL
UNION ALL
SELECT 3270001111112,'098757',TO_DATE('10/31/2007', 'mm/dd/yyyy'),'mo' ,
6000 FROM DUAL),
DATE_LIST AS
(SELECT TO_DATE('07/31/2007', 'mm/
(共0页)