problem in update..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madhurjya
    New Member
    • Nov 2007
    • 14

    #1

    problem in update..

    please help in this...

    i have a table structure as below

    name id code remarks line no

    a 0201 1 aa 1
    a 0201 1 b 1
    a 0201 1 qq 2
    a 0201 1 rr 2

    here i want to update the second record's line no as 46 and the fourth record's line no as 47.and keeping the 1st and 3rd record's line no remain same..so please help me to fix this pblm.i have a bulk of data.....thank you...reply
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    Try this:

    Code:
    Update your_table 
    set line = 46
    where line = 1 and remarks = 'b'
    
    
    Update your_table 
    set line = 47
    where line = 2 and remarks = 'rr'
    Good Luck.

    Comment

    Working...