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

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Is it possible to use a field from another table as part of a query?
Date: 2002-07-19 18:37:20
Message-ID: OF70E61741.D785C8E7-ON88256BFB.00664267-88256BFB.00664F48@fds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-07-19 18:54:27 Re: Is it possible to use a field from another table as part of a query?
Previous Message Tom Lane 2002-07-19 18:35:42 Re: Two Index Questions