Lists: | pgsql-sql |
---|
From: | Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | help |
Date: | 2010-05-05 03:05:27 |
Message-ID: | z2ze13d0d11005042005p21c76315ha13f12199f9cebe5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Hi,
I have a table in which the data's are entered like,
Example:
One (1)
Two (2)
Three (3)
I want to extract the data which is only within the parentheses.
that is
1
2
3
Thank You
Nicholas I
From: | Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> |
---|---|
To: | Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: help |
Date: | 2010-05-07 15:24:30 |
Message-ID: | s2u92869e661005070824l8f2d7139ibe75f79b02ecedd2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
select substring( data from '\((.*)\)' ) from table;
2010/5/5 Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com>:
> Hi,
>
> I have a table in which the data's are entered like,
>
> Example:
>
> One (1)
> Two (2)
> Three (3)
>
> I want to extract the data which is only within the parentheses.
>
> that is
> 1
> 2
> 3
>
>
> Thank You
> Nicholas I
>
>
--
Filip Rembiałkowski
JID,mailto:filip(dot)rembialkowski(at)gmail(dot)com
http://filip.rembialkowski.net/
From: | Marcin Krawczyk <jankes(dot)mk(at)gmail(dot)com> |
---|---|
To: | Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: help |
Date: | 2010-06-28 06:46:39 |
Message-ID: | AANLkTinXN6HQ4aVZ8kVhTmCAM35WatyUNzW1w-CV66NT@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Or even simpler, or easier to understand:
SELECT trim(foo, '()') FROM foobar
pozdrowienia / regards / salutations
mk
2010/5/5 Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com>
> Hi,
>
> I have a table in which the data's are entered like,
>
> Example:
>
> One (1)
> Two (2)
> Three (3)
>
> I want to extract the data which is only within the parentheses.
>
> that is
> 1
> 2
> 3
>
>
> Thank You
> Nicholas I
>
>