Import data from csv file

0

I have a csv file which has this data that takes them out of a single field.

As you will see, it is not only data from a single field.

In the table where I want to insert this data has the following structure.

The information I want to enter is in the fourth position, in what way can I get empty fields separated by commas in such a way that I reach the desired position?

I get the data through this query from a PostgreSql database

COPY (SELECT descripcion FROM tblarticulos) TO 'D:\productos.csv' DELIMITER ','; 

And the data from that csv file will be inserted into a SQL Server database.

    
asked by Pedro Ávila 15.10.2018 в 16:56
source

1 answer

0

If you want to generate a file with 3 empty fields in front of the description using that query, replace the select with:

select null, null, null, descripcion from tblarticulos
    
answered by 15.10.2018 / 17:10
source