2 Replies Latest reply: Mar 28, 2013 2:20 AM by Deepak Urs RSS

    Extract a previous record from a table

    Deepak Urs

      Hi,

       

      I have table where in the data is as follows

       

      Table-1

      ID
      Date
      Value
      Comp101-jan-2011AA
      Comp101-sep-2011AAA
      Comp101-jan-2012BB
      Comp101-sep-2013C
      Comp201-jan-2011BB
      Comp201-jan-2012AAA
      Comp201-sep-2012A
      Comp201-sep-2013BB
      Comp301-jan-2011AAA
      Comp301-sep-2011D
      Comp301-jan-2013AA
      Comp301-sep-2013AA

       

      I need to extract data as follows, how its possible

       

      Table-2

      IDPrevious Value
      Present Value
      Comp1BBC
      Comp2ABB
      Comp3DAA

       

      The data is stored as in table 1, i need to create a chart where the value that is current or value which is lastest should show in one column and value before it changes to the current value should be displayed in another column