From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Ramesh T <rameshparnanditech(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: postgres function |
Date: | 2015-10-15 19:20:14 |
Message-ID: | CAKFQuwYBAPqE7ZVhTewrrxpogb90foAfcx1R_i=7NYvGz5U-Pg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Oct 15, 2015 at 3:15 PM, Ramesh T <rameshparnanditech(at)gmail(dot)com>
wrote:
> yes David gave correct solution
>
> but , the value I'm using and it's column in the table sometimes value
> may be '123-987-123' or '123-987-123-13-87'
>
>
So adapt the answer provided to match your data.
if pass like below must return else condiion 0,
>
> select case when select split_part('123-987-123','-',4) >0
> then 1 else 0 end
> it's return error like integer need...
>
>
I have no clue what you are trying to say here...
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2015-10-15 19:55:53 | Re: question |
Previous Message | Ramesh T | 2015-10-15 19:15:35 | Re: postgres function |