Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to read a csv file in Pervasive?

How to read a csv file in Pervasive?

How to read a csv file in Pervasive?


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

I found the bdu utility but that hasn't helped yet. I get an error 3392: Cannot open DBNAMES.CFG file
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?

RE: How to read a csv file in Pervasive?

The queries you've tried won't work because Pervasive doesn't support them.
What is the command line you are using for the BDU. BDU must be run where the Pervasive engine is running. If you are running it on the client, you will get the "error 3392: Cannot open DBNAMES.CFG file" message.
An example command for BDU would be:


BDU.EXE DEMODATA Student testfile.txt -t, 
where DEMODATA is the database name, Student is the table name, testfile.txt is the flat file to be read, and the -t is the field delimiter and is set to comma (",") in the example.
The documentation for BDU in Zen v15 is at https://docs.actian.com/zen/v15/#page/uguide/uguid....


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close