Forming Query

Поиск
Список
Период
Сортировка
Искать

Forming Query

От:
Ronnie Doggart <rdoggart@netcomuk.co.uk>
Дата:
Hi All,

I want to prompt a user for information in a query. In Oracle the format
would be

select part_no, description from pricing where part_no like '&1';

what is it using psql and postgresql.

Regards
Ronnie Doggart

Re: [SQL] Forming Query

От:
Federico Passaro <fede@link.it>
Дата:
Ronnie Doggart wrote:

> Hi All,
>
> I want to prompt a user for information in a query. In Oracle the format
> would be
>
> select part_no, description from pricing where part_no like '&1';
>
> what is it using psql and postgresql.
>
> Regards
> Ronnie Doggart

  At the best of my knowledge there is no such a feature in psql, but you
can use a shell script like the following one:

_________________________________________________________________
#!/bin/bash

echo -n "Type Part No: "
read  PART_NO

psql   <
FAQ