profoundhypnotic
Programmer
Hello,
I have a project where we have a csv with two columns of data. This will be run from a task so I don't want to have to manually import the data each time it runs. I need to read the file, update a column in a table (with the first column value in the csv) based on the value in column 2 of the csv. I thought maybe I could just read the file in pervasive SQL but I think it would have to load into a temp table or a table I create for this purpose. The problem is, idk how to read in the file. I thought the sql command below would work based on the MYSQL documentation but I can't actually find documentation for LOAD DATA for PSQL. Is this not possible in PSQL?
Queries I've tried:
LOAD DATA INFILE 'file_path.csv'
LOAD DATA LOCAL INFILE 'file_path.csv'
The error I get is SQL ENGINE SYnatx Error: LOAD <<???>>> DATA
EDIT:
I found the bdu utility but that hasn't helped yet. I get an error 3392: Cannot open DBNAMES.CFG file
EDIT 2:
I found that you have to run BDU from the server not the client so I was able to import from csv. Is there another way or is this the only way other than the import wizard?
I have a project where we have a csv with two columns of data. This will be run from a task so I don't want to have to manually import the data each time it runs. I need to read the file, update a column in a table (with the first column value in the csv) based on the value in column 2 of the csv. I thought maybe I could just read the file in pervasive SQL but I think it would have to load into a temp table or a table I create for this purpose. The problem is, idk how to read in the file. I thought the sql command below would work based on the MYSQL documentation but I can't actually find documentation for LOAD DATA for PSQL. Is this not possible in PSQL?
Queries I've tried:
LOAD DATA INFILE 'file_path.csv'
LOAD DATA LOCAL INFILE 'file_path.csv'
The error I get is SQL ENGINE SYnatx Error: LOAD <<???>>> DATA
EDIT:
I found the bdu utility but that hasn't helped yet. I get an error 3392: Cannot open DBNAMES.CFG file
EDIT 2:
I found that you have to run BDU from the server not the client so I was able to import from csv. Is there another way or is this the only way other than the import wizard?