Is it possible to use a field from another table as part of a query? - Mailing list pgsql-sql

From Patrick Hatcher
Subject Is it possible to use a field from another table as part of a query?
Date
Msg-id OF70E61741.D785C8E7-ON88256BFB.00664267-88256BFB.00664F48@fds.com
Whole thread Raw
Responses Re: Is it possible to use a field from another table as part of a query?  (Josh Berkus <josh@agliodbs.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Two Index Questions
Next
From: Josh Berkus
Date:
Subject: Re: Is it possible to use a field from another table as part of a query?