data manipulation by row

  • hi - how can i restructure date based ProcessDataID. data show now like this in DB -

    IdnoProcessDataIDNameColor

    1-1- A-RED

    2-2- B-GREEN

    3-3- C-YELLOW

    4-4- D-BLUE

    5-5- E-ORANGE

    6-6- F-PINK

    aftre processing data it should look like this -

    Idno -ProcessDataID -Name-Color

    1-1- A-RED

    3-3- C-YELLOW

    2-2- B-GREEN

    5-5- E-ORANGE

    4-4- D-BLUE

    6-6- F-PINK

    2nd table should not be anything do with odd even.

    thank you

    neil

  • Hi,

    Check the DB table index is same with the second table.

    Or these second tables for analysis/report purpose ie like the temp purpose than just select with order by class.

  • NEAL-464478 (4/9/2010)


    hi - how can i restructure date based ProcessDataID. data show now like this in DB -

    IdnoProcessDataIDNameColor

    1-1- A-RED

    2-2- B-GREEN

    3-3- C-YELLOW

    4-4- D-BLUE

    5-5- E-ORANGE

    6-6- F-PINK

    aftre processing data it should look like this -

    Idno -ProcessDataID -Name-Color

    1-1- A-RED

    3-3- C-YELLOW

    2-2- B-GREEN

    5-5- E-ORANGE

    4-4- D-BLUE

    6-6- F-PINK

    2nd table should not be anything do with odd even.

    thank you

    neil

    Sorry, Neil. I don't understand what you want. You'll have to be more explicit.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • It doesn't sound like a processing issue but rather an issue of finding the proper ORDER BY condition.

    In order to do that it's required to define a sorting criteria. In your expected output there is none I can find. Neither is it sorted by name nor by color nor by "first odd Idno then even and within each group ascending" or any other consistent pattern.

    Please clarify.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • well requirment suppose to show like 2nd table, order by processdataID

  • NEAL-464478 (4/10/2010)


    well requirment suppose to show like 2nd table, order by processdataID

    There's nothing to sort on in the first table to present the data in the order of the second table. You'll need to build a "sister" table that has a predefined sort order.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • and how i can create sister table with the specific sort order which will show like 2nd table, i am new to sql any help will be much appreciated.

    Thanks

  • NEAL-464478 (4/12/2010)


    and how i can create sister table with the specific sort order which will show like 2nd table, i am new to sql any help will be much appreciated.

    Thanks

    Is there any business logic other than explicitly defining that the colors must be in a certain order?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 8 posts - 1 through 7 (of 7 total)

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