From: | Rodrigo De León <rdeleonp(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Needs Function |
Date: | 2007-05-03 07:17:21 |
Message-ID: | a55915760705030017g51ac2cb6icd01cf8f4fbeaf7e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 5/2/07, Penchalaiah P. <penchalaiahp(at)infics(dot)com> wrote:
> I need a user defined function for the following purpose….
>
> If I pass a string with comma ( , ) separated chars/values…. It should be appear in next line…
>
> Ex: select get_sep_str ('SK, rp, h, j, 6, 9, kl') from dual;
>
> Output :
>
> SK
>
> rp
>
> h
>
> j
>
> 6
>
> 9
>
> kl
>
>
>
> (Or)
>
>
>
> I have one table like this…..
>
>
>
> Temp Table:
>
>
>
> Deptno number(10)
>
> Empno varchar2(200);
>
>
>
> Data in temp table:
>
>
>
> Deptno Empno
>
> ----------- ------------
>
> 10 B3091,B3092,B3093,B3085
>
> 11 3651,6521
>
> 12 H3062
>
>
>
> Now, I want to display the data like this…..
>
>
>
> Deptno Empno
>
> --------- ---------
>
> 10 B3091
>
> 10 B3092
>
> 10 B3093
>
> 10 B3094
>
> 11 3651
>
> 11 6521
>
> 12 H3062
>
> Now, how can I achieve this….
See:
http://archives.postgresql.org/pgsql-general/2005-12/msg00080.php
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Bono | 2007-05-03 14:14:54 | Re: Needs Function |
Previous Message | Tom Lane | 2007-05-03 05:55:18 | Re: Dynamic prepare possible in plpgsql? |