Problem with trim query
Posted: Tue 27 May 2014 12:08
Hello,
I have to work with an old database that uses CHAR and TEXT fields. I need to remove the ending blank spaces of those fields so I have tried with RTRIM() but it is not allowed for TEXT fields. After that I tried with RTRIM(Convert(NVARCHAR(max),"column")) and it does the job, but it always sets the AllowDBNull column property to TRUE.
Is there an easy way to acomplish this? What can I do?
I have to work with an old database that uses CHAR and TEXT fields. I need to remove the ending blank spaces of those fields so I have tried with RTRIM() but it is not allowed for TEXT fields. After that I tried with RTRIM(Convert(NVARCHAR(max),"column")) and it does the job, but it always sets the AllowDBNull column property to TRUE.
Is there an easy way to acomplish this? What can I do?