Re: Whole-row comparison ?

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Whole-row comparison ?
Дата
Msg-id 473557.7523.qm@web31803.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Whole-row comparison ?  (<christian.roche.ext@nsn.com>)
Ответы Re: Whole-row comparison ?  (<christian.roche.ext@nsn.com>)
Список pgsql-sql
--- christian.roche.ext@nsn.com wrote:
> select * from temp."BSC_Table" t, public.bsc_view p where t.id = p.id
> and row(t) <> row(p);
> 
> ERROR: operator does not exist: "temp"."BSC_Table" <> bsc_view
> SQL state: 42883
> Hint: No operator matches the given name and argument type(s). You may
> need to add explicit type casts.
> 

Don't forget to reply all so that everyone on the list can participate.  Also, do this is good
since it doesn't limit you to my limited knowledge. ;)

row() doesn't do what you think it does.

you have to specify every column that you want to compare, so:

row(t.col1, t.col2, t.col3, t.col4) <> row(p.col1, p.col2, p.col3, p.col4)

where the datatypes of each respective column match. i.e. t.col1 maps to p.col1, ...

Regards,
Richard Broersma Jr.


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

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: Whole-row comparison ?
Следующее
От:
Дата:
Сообщение: Re: Whole-row comparison ?