Re: sql question (hopefully)

From: Dani Oderbolz <oderbolz(at)ecologic(dot)de>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: sql question (hopefully)
Date: 2003-06-18 13:27:41
Message-ID: 3EF068CD.2070803@ecologic.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Mel Jamero wrote:

>problem is "select id from b_table" in #2 statement has the following
>output:
>id
>----
>2,3,4
>
>
Well,
this is completely different from the first case,
because for Postgres, "2,3,4" is just a string rather than a set
of numbers
(as in select id from b_table).
Sure, you could solve your problem with stuff like
- Build your query-String, then Execute this
- Parse your "2,3,4" String
But its better if you have the correct data in b_table,
that is, only one id in a given row (this is the first step
of a process called "Normalization". If you have more than one
value in a given row/column pair, you will have a lot more problems
than just this one.

Cheers,
Dani

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-06-18 13:46:41 Re: Commit within a PL/PGSQL procedure
Previous Message Ron Johnson 2003-06-18 13:19:05 Re: sql question (hopefully)