Gerardo Herzig <[EMAIL PROTECTED]> schrieb: > Thanks! But now i have another problem related with count(): > > select page_id, word, word_position, count(page_id) from (select * from > search_word('word1', 'table1') union search_word('word2', 'table2')) foo > group by page_id; > > and gives me "foo.word must appear in GROUP clause or be used in an > aggregate function" > > And i want to group by page_id only, because that is what i need to count. > Tips here?
You can't aggregate without grouping the not-aggregated columns. Expand your 'group by' with word and word_position. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889° ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend