1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

MSSQL: Truncate nvarchar(max) when outputted as text

Discussão em 'Outras Linguagens' iniciado por Stack, Junho 5, 2021.

  1. Stack

    Stack Membro Participativo

    On MSSQL when I run my query I get the following output when run as Results To Text:

    Description Another Column
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -----------
    This is a Description 43289


    But interestingly there aren't any blanks at all at the end of the string, and the length is also the correct one (without any blanks)

    I want to have an output like this:

    Description Another Column
    -------------- --------------
    My description 543893


    I've tried rtrim, ltrim, replace, but none is working. The datatype is nvarchar(max).

    Continue reading...

Compartilhe esta Página