middle of string

  • I want to update a column (colA) in my database to include part of another column (colB) The update should give the resut of colB without the first 2 charachters. My initial thought was :

    MID([colB],3)

    But that is from Access and it doesn't work in SQL. Please help.


    "The grass is always greener over the septic tank." ~Leaf

  • Might try something like:

    Update MyTable

    set colA = substring(colB,3,size(colB))

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • STUFF(ColB,1,2,'')

    --Jonathan



    --Jonathan

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

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