Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have this situation
id | from | to | ||
2 | 02/01/2012 | |||
3 | 03/01/2012 | 04/01/2012 | ||
4 | 04/01/2012 | 09/01/2012 | ID 2 TWO NULL | |
3 | 05/01/2012 | |||
3 | 06/01/2012 | 09/01/2012 | ID 3 TWO NULL | |
2 | 07/01/2012 | 07/01/2012 | ||
2 | 08/01/2012 | |||
4 | 09/01/2012 | ID 4 NULL ONLY ONE | ||
3 | 10/01/2012 | 11/01/2012 | ||
3 | 11/01/2012 |
i NEED TO LOAD IF IS NULL WITH WHERE BUT SOME TIMES ORIGNAL DATA IS BAD.
How to load only the last null ??
regards..
please could you explain the rule to identify nulls?
or mark the records you want to load?
i need load all records.
i have not rule. some records has more than one null (data base is wrong)
if i has 2 null the las is the valid the other is from-1.
example.
10/01/2012 null(14/05/2012 will be)
15/05/2012 null
regards
Hi,
I think you have to load the data in descending order by id and from date
Then you could work with previous() function to get the 'from' to fill the 'to' in current record when null, only do this when id is the same (id = previous(id)).
Could this help?
Dirk