We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


using COPY command to skip column — Vertica Forum

using COPY command to skip column

Hello, I am trying to load a file into a table using COPY command, considering the source file contains columns col1, col2, col3 and the destination table contains columns col1, col2, col3 also.
I want to skip col2 from loading (I want to keep it NULL in the destination table)
I tried to use FILLER but it didn't work, so how to skip this column please

Tagged:

Answers

  • COPY t1 (col1,
    v1 FILLER VARCHAR(20),
    col3)
    FROM LOCAL 'C:\folder\file1.csv'
    WITH DELIMITER AS ','

  • please try in this way:
    COPY t1 (col1,
    f_v1 filler VARCHAR,
    col2 as NULL,
    col3)
    FROM LOCAL 'C:\folder\file1.csv'
    WITH DELIMITER AS ','

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file