Remove tabs

  • Is it possible to remove tabs from a varchar field in sql server ?

  • jabba (9/11/2008)


    Is it possible to remove tabs from a varchar field in sql server ?

    You can use the REPLACE function with the CHAR function. CHAR(9) is the tab character.

    An example:

    SELECT REPLACE ( 'aaa'+CHAR(9)+CHAR(9) + 'aa' , CHAR(9), ' ')

    The above will replace the two tabs in the 'aaa\t\taa' string with spaces.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

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

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