Immediate Help............

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • san1014
    New Member
    • Jul 2007
    • 37

    Immediate Help............

    Hi....
    I have a table with two columns. Col1 contains ids and col2 contains brands for a particular id:

    COL1 COL2
    1 N
    1 R
    1 L
    2 L
    2 R
    3 L
    3 N
    4 N
    4 R

    I want to update col2 such tht if an ID [col1] has brand [col2] N then all other brands for it should be update to N. N has the highest priority, then R and then L. That's if an ID [col1] has two brands R and L, then tht ID should be update to both brands as R. Similarly if an ID has all the three brands then all its brands should be updated to N

    o/p shd be like this....

    COL1 COL2
    1 N
    1 N
    1 N
    2 R
    2 R
    3 N
    3 N
    4 N
    4 N

    Plz help me....
    sandeep.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Hi
    san1014
    Welcome to TSDN.

    You have reached the right place for knowledge shairing.

    Here you will find a vast resource of related topics and code.

    Feel free to post more doubts/questions in the forum.

    But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.

    It will help Experts in the forum in solving/underestanding your problem in a better way.

    Please follow the posting guidelines in every new post/reply.

    Please specify your post/question clearly.

    Regards

    Debasis

    Comment

    Working...