Anyone have sample code of running query against PostgreSQL Database Tables?

Started by CoreyGlenn, December 18, 2014, 08:54:17 AM

Previous topic - Next topic

CoreyGlenn

I have a requirement to connect to a PostGreSQL Database ver 9.1 to run queries to extract data for processing.
I used Stan Littlefield's example from a few years back to confirm connectivity and it works. However, I don't know the first thing about executing a query of a PostGreSQL table from within WinBatch.
Has anyone successfully connected to PostGreSQL database and run a query from within WinBatch?

Known constraints: It's a hosted application with Read Only access to the database tables. There is no option to execute stored procedures.
Database Version String : PostgreSQL ver 9.1.9 on sparc-sun-solaris2.10 (hosted system)
Encryption: Not Encrypted
The database is large over 1400 tables with realtime changing data so I don't have the option of extracting the data to another database.

If anyone has any ideas that would be great!

Thanks,

Corey