ERROR 2559: Cannot use subquery in expressions within COPY

Moderator: NorbertKrupa

Post Reply
bhaggyit
Newbie
Newbie
Posts: 10
Joined: Thu Apr 04, 2013 10:48 am

ERROR 2559: Cannot use subquery in expressions within COPY

Post by bhaggyit » Mon May 12, 2014 8:47 am

Guys,
Could someone please suggest a resolution for the COPY statement error below:
ERROR 2559: Cannot use subquery in expressions within COPY

The problematic line in question is below:
COPY...

,NE_VERSION AS (SELECT NE_VERSION FROM <lookup table> WHERE EMS_NAME = 'xxx')

Regards,
Bugs.

User avatar
nnani
Master
Master
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am
Contact:

Re: ERROR 2559: Cannot use subquery in expressions within C

Post by nnani » Tue May 13, 2014 5:57 am

Hello,

You cannot use a sybquery inside a COPY statement.
COPY command is bulk loader utility in Vertica which loads the data from files or STDIN. it is not capable of loading data from another table.
Please refer the documentation
https://my.vertica.com/docs/7.0.x/HTML/ ... gLoads.htm

Hope this helps
nnani........
Long way to go

You can check out my blogs at vertica-howto

Post Reply

Return to “Vertica SQL”