Re: SQL Intersect like problem

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: SQL Intersect like problem
Дата
Msg-id 20030205041947.GC11467@wolff.to
обсуждение исходный текст
Ответ на SQL Intersect like problem  ("Dinesh V" <dinesh@trailblazingsolutions.com>)
Список pgsql-novice
On Tue, Feb 04, 2003 at 21:00:47 -0500,
  Dinesh V <dinesh@trailblazingsolutions.com> wrote:
> Hello Folks,
>
> I have 7.3.1 running, and have an interesting SQL problem, please help.
> Consider an Invoice Table with columns
>
> InvoiceId
> ProductId
> Quantity
>
> Given a set of ProductId and Quantity, I need to find the InvoiceId that
> correspond to it.  I can create a temp table with these 2 columns (ProductId
> and Quantity) if necessary.

Unless there is more to this problem, you can just do something like:
select InvoiceID from Invoice_table where
  ProductID = 'XXX' and Quantity = 'YYY';

В списке pgsql-novice по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: locking granularity
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proc.h and lock.h