Gurus, here is something that I need your help on
I have two cols - F.No and W.No (Both of Datatype Integer), and two date cols , s.date and e.date
||F.No||W.NO||e.date||s.date||
F.no - is supposed to have only one W.no associated with it, and only either of s.date or e.date associated with it.
Currently its so happening that some W.no's have both e.date and s,.date , and if that is happening we need to push the s.date ahead (something like a s.date + 5, not quite that simple , but for the purposes of this conv something like that).....
This so, that every w.no has only date associated with it.
I'm really stumped for the logic and don't where to begin.
Any pointers in the right direction are greatly appreciated
Thank you for your time
Regards
IS
Logic for implementation of the req
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
Some more data
Sorry, here is more info.
The First column is activity number , the second col is week number , the date cols are end.date and start.date....
This is how ideally the data should look like
F.no||w.No||e.date||s.date||
1 || 234||Oct 4th||0||
The current data looks like
F.no||w.No||e.date||s.date||
1 || 234||Oct 4th||Oct 6th||
One activity cannot have either a e.date or s.date for the same week (w.No), not both as is the case in the above example.
If that's the case the activity s.date needs to be pushed to the next week (235).
So the data should look like
F.no||w.No||e.date||s.date||
1 || 234||Oct 4th||0||
1||235||0||Oct 6th||
At this point even the date representation doesnt matter, what is really necessary if a week has both e.date and s.date , the s.date gets pushed to the next week (from 234 to 235).
Thank you for taking the time to look at it and respond.
Regards
IS
The First column is activity number , the second col is week number , the date cols are end.date and start.date....
This is how ideally the data should look like
F.no||w.No||e.date||s.date||
1 || 234||Oct 4th||0||
The current data looks like
F.no||w.No||e.date||s.date||
1 || 234||Oct 4th||Oct 6th||
One activity cannot have either a e.date or s.date for the same week (w.No), not both as is the case in the above example.
If that's the case the activity s.date needs to be pushed to the next week (235).
So the data should look like
F.no||w.No||e.date||s.date||
1 || 234||Oct 4th||0||
1||235||0||Oct 6th||
At this point even the date representation doesnt matter, what is really necessary if a week has both e.date and s.date , the s.date gets pushed to the next week (from 234 to 235).
Thank you for taking the time to look at it and respond.
Regards
IS
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Derive EDate as something like:
Apply appropriate conversion functions where needed.
Code: Select all
If IsNotNull(InLink.SDate) And IsNotNull(InLink.EDate) Then DateFromDaysSince(7,InLink.EDate) Else InLink.EDate
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.