Hi Gurus,
I am just started learning Vertica. I have executed the below query to find out the length of the string and this is given example in the Vertica. This below error has thrown SELECT LENGTH('vert\0ica'::BINARY VARYING);
ERROR 3678:Invalid input syntax for varbinary
Please let me know the correction and thanks in advance.
ERROR 3678:Invalid input syntax for varbinary
Moderator: NorbertKrupa
-
- Newbie
- Posts: 1
- Joined: Tue Aug 27, 2013 12:23 pm
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: ERROR 3678:Invalid input syntax for varbinary
Hi there!
What are you trying to do? Maybe you need to escape?
Or do something like this?
I'm not sure what your intentions are
What are you trying to do? Maybe you need to escape?
Code: Select all
dbadmin=> SELECT LENGTH('vert\\0ica'::BINARY VARYING);
LENGTH
--------
9
(1 row)
Code: Select all
dbadmin=> SELECT LENGTH('vert' || E'\0' || 'ica');
LENGTH
--------
8
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.