Some one help me to use the PQexec() function to the given requirements.
I have incoming CSV files in a folder. I need to insert them in a table using a C program. I have those CSV files listed in a txt file. Every line in the text file is the name of the CSV file to be read. I read the file name in a C variable . Can some one help me in using that variable in query in PQexec() function.
I need something like this
file contains CSV files
In C file, I read every line using file pointers:
res = PQexec(conn, "copy table_CSV from 'value' DELIMITERS ',' CSV");
This is not working
I even tried
res = PQexec(conn, "copy table_CSV from "value" DELIMITERS ',' CSV");
res = PQexec(conn, "copy table_CSV from "+value+" DELIMITERS ',' CSV");
They are also not working.. Some urgent help is required..Any help is highly appreciated ..