query to select rows based on comparision of columns

  • hi all,

    I have a table that contains hierarical data as follows

    col1 col2

    aa null

    aa.abc aa

    aa.axy aa

    aa.abc.01 aa.abc

    aa.abc.02 aa.abc.01

    aa.axy.01 aa.axy

    aa.axy.011 aa.axy

    aa.axy.012 aa.axy.01

    but i need the output as follows

    col1 col2

    aa null

    aa.abc aa

    aa.abc.01 aa.abc

    aa.abc.02 aa.abc.01

    aa.axy aa

    aa.axy.01 aa.axy

    aa.axy.012 aa.axy.01

    aa.axy.011 aa.axy

    Sorry, I was not completed my question due some urgent process but now I edited it.

    Help me to solve this issue

    Thanks in advance

    Regards

    Durgesh

  • Tell me Clearly ,What's your expectations?

  • DURGESH (5/29/2009)


    hi all,

    I have a table as follows

    col1 col2

    aa null aa.abc aa aa.abc.01 aa.abc aa.abc.02 c aa bb ab

    Hi,

    For the better assistance to your requirement, at least do/submit the a) the table schema with some data b) result sets/formats c) your trial coding/statements

    ARUN SAS

  • DURGESH (5/29/2009)


    hi all,

    I have a table as follows

    col1 col2

    aa null

    aa.abc aa

    aa.abc.01 aa.abc

    aa.abc.02

    ac aa

    bb ab

    Where's the question?? How about reading this article on how to post questions in forums to get better responses[/url].

    --Ramesh


Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply