Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    4

    Unanswered: compare by itself

    HI,

    I am trying to compare table with itself , & whereever the data changes for one row ,would like to get the row above that.

    Here is example:
    Table A

    X Y Z
    1 FIS STRT
    2 DTC STRT
    3 REP CONX
    4 REP CONX


    I want to fetch row 2 from the table as the data in col Z changes in row 3.

    Thanks
    JB

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >would like to get the row above that.
    The statement above makes NO sense.
    Rows within a table have NO order.
    Define "above".
    "Above" based upon which column?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2003
    Posts
    4

    Re: compare by itself

    Originally posted by jitubhatia
    HI,

    I am trying to compare table with itself , & whereever the data changes for one row ,would like to get the row where the value of Y changes .

    Basically i want to compare the same table & wherever the data in Z changes , wants to capture the data .

    Here is example:
    Table A

    X Y Z
    1 FIS STRT
    2 DTC STRT
    3 REP CONX
    4 REP CONX


    I want to fetch row 2 from the table as the data in col Z changes in row 3.

    Thanks
    JB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •