Truncate Statement

  • Can someone please help.

    My data like this:

    Product

    MA7017A-T-TR-014

    MA7017A-T-TR

    How can I write a sql statement that give the result like:

    Product                                                     Part

    MA7017A-T-TR-014                               MA7017A-T-014

    MA7017A-T-TR                                       MA7017A-T

    Thanks very much.

    Minh

     

     

  • Hi,

    Try these statements..

    SELECT Replace ('MA7017A-T-TR-014', '-TR', '') AS Part

    SELECT Replace ('MA7017A-T-TR', '-TR', '') AS Part

     


    Lucky

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

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