Re: trimming a column
От
Greg Williamson
Тема
Re: trimming a column
Дата
Msg-id
1336096502.92579.YahooMailNeo@web46110.mail.sp1.yahoo.com
Ответ на
trimming a column (Michael P. Soulier)
Список
Дерево обсуждения
trimming a column "Michael P. Soulier" <michael_soulier@mitel.com>
Re: trimming a column Greg Williamson <gwilliamson39@yahoo.com>
Re: trimming a column Adrian Klaver <adrian.klaver@gmail.com>
Re: trimming a column Adrian Klaver <adrian.klaver@gmail.com>
Re: trimming a column "Michael P. Soulier" <michael_soulier@mitel.com>
Re: trimming a column "Michael P. Soulier" <michael_soulier@mitel.com>
Re: trimming a column "Michael P. Soulier" <michael_soulier@mitel.com>
Michael -- >Hi, > >I need to trim whitespace off of a whole column and replace the existing >values with the trimmed ones. > >This isn't working > >update mytable set id = trim(id); > >I'm not sure of the correct syntax. Help appreciated. > >Mike > The trim function needs to be told what sort of trim to do -- Following the 9.1 manual (you did not specify which version of postgres you are using) try: UPDATE mytable SET id = trim(both ' ' from id). (untested) See HTH, Greg Williamson
В списке pgsql-general по дате отправления