Data conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nafta
    New Member
    • Mar 2008
    • 1

    Data conversion

    I have a view with employee type history.
    EmployeeID | EmployeeTypeTit le | EmployeeStartDa te
    1 | trial | 2007-09-01
    1 | regular | 2008-03-01
    2 | trial | 2007-11-01

    But now I need the data in a different format, with every month on a single row. Like this
    EmployeeID | Period | EmployeeTypeTit le
    1 | 200709 | trial
    1 | 200710 | trial
    1 | 200711 | trial
    1 | 200712 | trial
    1 | 200801 | trial
    1 | 200802 | trial
    1 | 200803 | regular
    2 | 200711 | trial
    2 | 200712 | trial
    2 | 200801 | trial
    2 | 200802 | trial
    2 | 200803 | trial

    I hope this make any sense.
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    #2
    Theres no simple solution to this as far as i can see, i think it needs to be choped up with some reasonably complex code.

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      What happens next month, 200804? How would your table look like? Will you still add a record for your EmployeeID = 1? Do you add another record for EmployeeID=2? Or before cut-off/processing day, a new record will be inserted if employee becomes regular? After that cut-off day, whatever is on the table will be processed?

      -- CK

      Comment

      Working...