469,929 Members | 1,771 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

Removing Punctuations

Hi All,

I want to remove all the punctuations in an address column if any:

Select translate(ADDR,' ',':;.,!?-') from Table;

I am able to remove all except for single quote ('). Can you please
please suggest a way us Db2- sql

thanks
vijayk

Jan 12 '06 #1
2 1733
Put single quote twice, eg.:

Select translate(ADDR,' ',':;.,''!?-') from Table;

-- Artur Wronski

Jan 12 '06 #2
vijayk wrote:
Hi All,

I want to remove all the punctuations in an address column if any:

Select translate(ADDR,' ',':;.,!?-') from Table;

I am able to remove all except for single quote ('). Can you please
please suggest a way us Db2- sql

thanks
vijayk

You need to escape it by doubling: ':;.,!''?-'

--
Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab
Jan 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jeremy Owens-Boggs | last post: by
reply views Thread by sameer mowade via .NET 247 | last post: by
3 posts views Thread by Nathan Sokalski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.