Re: SELECT ... WHERE ... NOT IN (SELECT ...);

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: SELECT ... WHERE ... NOT IN (SELECT ...);
Дата
Msg-id 200208231024.28241.dev@archonet.com
обсуждение исходный текст
Ответ на Re: SELECT ... WHERE ... NOT IN (SELECT ...);  (Yon Den Baguse Ngarso <yon@dugem.com>)
Список pgsql-sql
On Friday 23 Aug 2002 9:28 am, Yon Den Baguse Ngarso wrote:
> Oops correction.
>
> If i create tbl1 & tbl2, and then load it with the data.
> The result is CORRECT. Like yours.
>
> But, if the data loaded from another table, the result become WRONG/ null
> record.
>
> Here is my detail step. Please Help.

> myhost=# --create new temp tbl1
> myhost=# SELECT losteventid AS eventid INTO tbl1 FROM outages;
> myhost=# --create new temp tbl2
> myhost=# SELECT regainedeventid AS eventid INTO tbl2 FROM outages;

These aren't creating temporary tables, they are creating permanent tables. Do
you have data from previous runs in there?

Try SELECT ... INTO TEMPORARY tbl1 ...

- Richard Huxton


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

Предыдущее
От: Yon Den Baguse Ngarso
Дата:
Сообщение: Re: SELECT ... WHERE ... NOT IN (SELECT ...);
Следующее
От: Andreas Tille
Дата:
Сообщение: Updatable View (Was: Separating data sets in a table)