ERROR 3678:Invalid input syntax for varbinary

Moderator: NorbertKrupa

Post Reply
Hemakumar Gantepalli
Newbie
Newbie
Posts: 1
Joined: Tue Aug 27, 2013 12:23 pm

ERROR 3678:Invalid input syntax for varbinary

Post by Hemakumar Gantepalli » Thu Sep 12, 2013 3:38 pm

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.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: ERROR 3678:Invalid input syntax for varbinary

Post by JimKnicely » Thu Sep 12, 2013 3:49 pm

Hi there!

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)
Or do something like this?

Code: Select all

dbadmin=> SELECT LENGTH('vert' || E'\0' || 'ica');
 LENGTH
--------
      8
(1 row)
I'm not sure what your intentions are :?:
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “New to Vertica”