Re: Run Time Variables
Anthony E . Greene <agreene@pobox.com>
From: "Anthony E . Greene" <agreene@pobox.com>
To: pgsql-novice@postgresql.org
Date: 2001-03-11T13:57:19Z
Lists: pgsql-novice
On Sat, 10 Mar 2001 13:37:39 Phil Hayward wrote: >Can anyone assist please? >In Oracle it is possible to enter variables at run time with a query as >follows > >SELECT name, salary, dept >FROM emp >WHERE empid = &empid; > >On running the query you will be prompted ..... > >Enter value for empid: > >Is there an equivalent feature in PostgreSql, Psql ? In pgaccess you can create a query that looks like this: select name, salary, dept from emp where emp_id = '[parameter "Employee ID?"]' A dialog box will prompt you for input. I don't know of a way to do this within psql. Tony -- Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/> PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D Chat: AOL/Yahoo: TonyG05 ICQ: 91183266 Linux. The choice of a GNU Generation. <http://www.linux.org/>