From mailto.stefanrehm@gmx.de Tue Apr 20 02:02:32 2010 From: Stefan Rehm To: gretl-users@gretlml.univpm.it Subject: [Gretl-users] Postgresql ODBC connection Date: Mon, 19 Apr 2010 17:19:17 +0200 Message-ID: <1271690357.9529.4.camel@stefan-laptop> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3297697978136215920==" --===============3297697978136215920== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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? Best Regards Stefan --===============3297697978136215920==-- From r.lucchetti@univpm.it Tue Apr 20 03:22:48 2010 From: Riccardo (Jack) Lucchetti To: gretl-users@gretlml.univpm.it Subject: Re: [Gretl-users] Postgresql ODBC connection Date: Tue, 20 Apr 2010 09:22:45 +0200 Message-ID: In-Reply-To: 1271690357.9529.4.camel@stefan-laptop MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8650884128887286780==" --===============8650884128887286780== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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: Riccardo (Jack) Lucchetti Dipartimento di Economia Università Politecnica delle Marche r.lucchetti(a)univpm.it http://www.econ.univpm.it/lucchetti --===============8650884128887286780==--