On Mon, 19 Apr 2010, Stefan Rehm wrote: > Hi, > i want to extract data from an existing PostgreSQL database on > localhost. I tested the ODBC connection with OpenOffice and it works > nice after entering the database user and password. > But i'm still confused to extract the data with Gretl. I connected via > the gretl console to the database named eix with > > open dsn=eix user=databaseuser password=password --odbc > > and there are no output from the gretl console. how can i access the > data?
You're halfway through. The "open" command establishes the connection. The actual data retrieval is a job for the "data" command, which stores the output of an SQL query. Example: <script> qry = "select foo from bar" data myseries query=qry --odbc </script> Riccardo (Jack) Lucchetti Dipartimento di Economia Università Politecnica delle Marche r.lucchetti(a)univpm.it http://www.econ.univpm.it/lucchetti