Is it possible to use a field from another table as part of a query?

Поиск
Список
Период
Сортировка
От Patrick Hatcher
Тема Is it possible to use a field from another table as part of a query?
Дата
Msg-id OF70E61741.D785C8E7-ON88256BFB.00664267-88256BFB.00664F48@fds.com
обсуждение исходный текст
Ответы Re: Is it possible to use a field from another table as part of a query?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-sql
I originally sent this question to the Novice group, but realized I should
have asked it here:

I have a table that contains a VARCHAR field with data formatted as such:
12,44,13,225
what I would like to do is use this field in a query to another table such
as:

CREATE TABLE category_tree ( tree varchar(200)
) WITH OIDS;

Select * from mdc_products
where keyf_category_home IN  (select tree from category_tree)

However, my keyf_category_home field is an INT4.  Is there a way to parse
out the tree field so that I can define it as INT4?
TIA

Patrick Hatcher





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Two Index Questions
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Is it possible to use a field from another table as part of a query?