Re: join and sort on 'best match'

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: join and sort on 'best match'
Дата
Msg-id 1166212007.6369.194.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: join and sort on 'best match'  ("Ashish Ahlawat" <ahlawat.ashish@gmail.com>)
Список pgsql-sql
On fös, 2006-12-15 at 22:10 +0530, Ashish Ahlawat wrote:
>  
>  
> Hi team
>  
> I was just asking that If table ITEM3 has all the columns then why we
> need to have a join ?? even we put a sorting very easily.

> On 12/14/06, Markus Schaber <schabi@logix-tt.com> wrote: 
>         Hi, Ashish,
>         
>         "Ashish Ahlawat" <ahlawat.ashish@gmail.com> wrote:
>         
>         > if table *Item 3 : news, nature, greenpeace, whale has all
>         clmn y v need
>         > join ??*

it seems these where not columns of a table.

the organisation was like this:

table items:

id   name
-----------
1    foo
2    bar
3    item3


table tags:

tag_id   text
---------------------
1        news
2        nature
3        tennisballs
4        greenpeace
5        cannibals
6        whale

and table items_tags:

item_id  tag_id
----------------
3        1
3        2
3        4
3        6
...


so table items needs to be joined to table tags via 
table items_tags to retrieve the connections from item3
to news, nature, greepeace and whales.

gnari




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

Предыдущее
От: "Ashish Ahlawat"
Дата:
Сообщение: Re: join and sort on 'best match'
Следующее
От: "Aaron Bono"
Дата:
Сообщение: Unions and Grouping