Yet another SQL Server enthusiast

2017-07-25

SQL Server 2017 New Features: TRANSLATE

Filed under: Uncategorized — sa @ 3:54 PM

TRANSLATE(arg1, arg2, arg3) function is an extension of REPLACE function. It will replace within arg1 (the source strings) the characters from arg2 with the characters found on the same position (index) in arg3:

sql.server.2017.TRANSLATE.function

In this example, Ă will be replaced with A, Â with A, Î with I and so on. COLLATE is used to make sure that upper/lower chars (source text) are replaced properly (example: â is replaced with a and not with A).

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: