Tips & Tricks

Special Characters


Vertica uses extended (E) and Unicode (U) escaping for special characters. Some common special characters which need escaping are:

Extended String Syntax Unicode Literal String Description ASCII Decimal
E’\n’ U&’\000a’ Linefeed 10
E’\f’ U&’\000c’ Formfeed 12
E’\r’ U&’\000d’ Carriage return 13
E’\\’ U&’\005c’ Backslash 92

Extended Example

This example allows the literal use of a horizontal tab by wrapping the string in E'':


Unicode Example

This example uses Unicode 0033 to locate and replace the 3 digit:


ASCII Example

The CHR function will convert the first octent of an integer:


About the author / 

Norbert Krupa

Norbert is the founder of and a Solutions Engineer at Talend. He is an HP Accredited Solutions Expert for Vertica Big Data Solutions. He has written the Vertica Diagnostic Queries which aim to cover monitoring, diagnostics and performance tuning. The views, opinions, and thoughts expressed here do not represent those of the user's employer.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Upcoming Events

  • No upcoming events
AEC v1.0.4

Subscribe to Blog via Email

Enter your email address to subscribe and receive notifications of new posts by email.

Read more use cases here.


This site is not affiliated, endorsed or associated with HPE Vertica. This site makes no claims on ownership of trademark rights. The author contributions on this site are licensed under CC BY-SA 3.0 with attribution required.
%d bloggers like this: