Re: [GENERAL] How to express categorized items in relational tables

From: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] How to express categorized items in relational tables
Date: 1999-05-14 05:08:56
Message-ID: 373BAFE8.2D40B94C@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I think you want something like...
INSERT INTO child(foo,bar,baz,category) SELECT 'foo1', 'bar1', 'baz1,
oid FROM category WHERE category.name = 'CategoryFoo';

I'm not sure. Is that what you mean?

Doo Suk Yang wrote:

> Thank you for your answer. It is going to be working.
>
> BTW, when inserting a parents category I had to go through two steps;
> selecting category of parents and inserting new title and selected
> category. Of course I'm using Perl and the above two steps are not great
> matter. But still I'm curious is it possible to write an SQL statement to
> do it.
>
> ===============================================================================
> Science is the game we play with God to find out what his rules are.
> -------------------------------------------------------------------------------
> Doo Suk Yang
> Research Scientist Voice: 82-42-866-2222
> LG Chemical Ltd. Research Park
> Biotech Research Institute I FAX: 82-42-861-2566
> -------------------------------------------------------------------------------
> A fool hath no delight in understanding, but that his heart may discover itself.
> (Proverbs 18:2)
> ===============================================================================

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stphane Popinet 1999-05-14 08:36:38 overwriting large objects bug?
Previous Message Doo Suk Yang 1999-05-14 02:41:09 Re: [GENERAL] How to express categorized items in relational tables