Update Query

  • I have One Doubt on Update Statement.

    I have field value like

    ' xxx123456',

    'xxx789654',

    'xxx456987'.

    now I want to update taht value as last digit four ones like

    'xxx121111',

    'xxx781111',

    'xxx451111'

    Please Help me out this Problem..

  • hi,

     select replace(columnname,right(columnname,4),'1111') from tablename

     

    regards

    Anurag

  • How about

    UPDATE tableName SET colName = ... WHERE colName LIKE '%1111'

    ?

  • Looking at your request, the replace method is definately the best option.

    Marvin Dillard
    Senior Consultant
    Claraview Inc

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

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