Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey folks. I don't know how to search the forum for this, so I'll just post my problem and hope for some help.
My table houses many different costs and dates associated with those costs. Unfortunately, our data isn't great, and there's nulls where there should be expiration dates. So for example I have the following situation:
Record 1
NDC = 11111
Cost = $1.45
Effective Date = 1/1/2008
Expiration Date = null
Record2
NDC = 11111
Cost = $1.56
Effective Date = 1/1/2009
Expiration Date = null
What I want to do is get the expiration date on record 1 to be the record2 effective date minus 1 day. This isn't the case all of the time, but we are experiencing this for about 1/10 of the time.
Hoping somebody can help.
Rob
This can be achieved using peek() function.
I have tried out a sample app, which replaces 0 with the value from subsequent row.
Just have a look at the script. Hope it may help