Run PSQL query from command line or script
Run PSQL query from command line or script
(OP)
Hi,
We currently run queries against our Btrieve files using a utility called IQ (aka BMQ) which we can either use interactively or call from a DOS batch script. The latter method is used during EODs to run various regular scripts.
We're upgrading to PSQL v10 and in our new environment it has been decided that we cannot use that utility anymore. Hence I am stuck with finding an alternative, or I should say a free alternative! Something along the lines of SQL Server's osql.
Ah! Whilst creating this question I think I've found the answer. I'll post this anyway in case it helps anyone else and also if anyone has any tips on using the utility "pvddl" in a Windows environment (W2K3 and XP).
Thanks,
Bob
We currently run queries against our Btrieve files using a utility called IQ (aka BMQ) which we can either use interactively or call from a DOS batch script. The latter method is used during EODs to run various regular scripts.
We're upgrading to PSQL v10 and in our new environment it has been decided that we cannot use that utility anymore. Hence I am stuck with finding an alternative, or I should say a free alternative! Something along the lines of SQL Server's osql.
Ah! Whilst creating this question I think I've found the answer. I'll post this anyway in case it helps anyone else and also if anyone has any tips on using the utility "pvddl" in a Windows environment (W2K3 and XP).
Thanks,
Bob
RE: Run PSQL query from command line or script
I don't think PVDDL.EXE is supported by Pervasive. I know it is used by the PSQL install to create tables and the system stored procedures. I did a quick test and it didn't return any results.
Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com
RE: Run PSQL query from command line or script
However, when I tried a simple query I got the following two line output.
pvddl: select * from bank_diary_file (my query)
pvddl: The data definitions have been updated
Hmm! Think I'll look at pvquery....