query an array...

From: Heiko Wilms <wilms(at)stud(dot)fh-hannover(dot)de>
To: pgsql-sql(at)hub(dot)org
Subject: query an array...
Date: 1999-05-19 06:56:22
Message-ID: 37426096.158674B9@stud.fh-hannover.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> Hi,
>
> I stucked upon the following situation:
> create table test (
> n int[] );
>
> insert into test values (
>
> '{1,2,3,4}'
>
> );
>
> now I need a query that returns all four numbers in different variables,i.e.
>
> an array like n[1],...,n[4]
>
> I tried queries like
>
> select test.n from test which returns {1,2,3,4}
>
> or
>
> select test.n[i] from test, where i is 1,2,3 or 4 which each returns 1,2,...
>
> What I'm looking for is a query that returns four rows with one number in each
>
> result index. Can anyone help?
>

--
H. Wilms

Homepage schering.si2.uni-hannover.de/hugo
email wilms(at)stud(dot)fh-hannover(dot)de

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Roberto Fichera 1999-05-19 09:24:33 Test access
Previous Message Chris Bitmead 1999-05-19 05:08:18 Re: [SQL] Why wont this update work?