The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

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 ','

  • viganogviganog Employee

    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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.