Re: INSERT ... SELECT DISTINCT - Doesn't work...

Поиск
Список
Период
Сортировка
От Cesar A. K. Grossmann
Тема Re: INSERT ... SELECT DISTINCT - Doesn't work...
Дата
Msg-id 396BB9F6.DB33E2DB@rotnet.com.br
обсуждение исходный текст
Ответ на INSERT ... SELECT DISTINCT - Doesn't work...  ("Cesar A. K. Grossmann" <cesar@rotnet.com.br>)
Список pgsql-general
> Cesar's example looked like it didn't run into these problems, so I'm
> not sure what's going wrong for him.

I'm sorry. In fact, I was not so carefull with my analisis and the
example I provided you was not exactly like the real problem.

First, I have failed to use the same type in the columns (integer in one
relation, varchar in the other). I think this was the major problem. To
make the example more realistic:

user_operations (
        user_id    integer,
        user_name  varchar,
        user_operation varchar)

CREATE TABLE users (
        user_id         varchar,
        user_name       varchar);

the column user_id from the relation users was with the wrong type
(varchar). I changed it to integer (as user_operations), and the INSERT
works well.

[]s
--
César A. K. Grossmann
ckant@usa.net
http://members.xoom.com/ckant/
Para os sádicos e corajosos e infantis:
http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html

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

Предыдущее
От: Chris Bitmead
Дата:
Сообщение: Re: Slashdot discussion
Следующее
От: ryan
Дата:
Сообщение: Stored Procedure warnings