Trim Function in SQL Server - SQL in Sixty Seconds #040

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I was getting the same error and you video solved my problem. Thanks a lot
you should add the work error in your title also so its easier to find

mozi
Автор

00:23 You say "RTRIM removes the leading spaces and LTRIM removes trailing spaces". In fact it's the other way around.
Great videos, keep 'em coming!

RuHa
Автор

I have leading, mid, or trailing spaces in a column in a SQL Server table

All data in this column has either leading, mid, or trailing spaces.

I want to remove all those, and I want to have the data without any extra spaces.

The record is like " Hello World '"

LTRIM(RTRIM()) will give a returnset of "Hello World"

I want the record to be "Hello World"

In MS Excel TRIM() will remove all extra spacing from leading, mid, or trailing. Is there an equivalent method in Sql Server?

kevindion