Re: CVS to In_list without dynamic SQL, how? - Mailing list pgsql-sql

From Michael Moore
Subject Re: CVS to In_list without dynamic SQL, how?
Date
Msg-id CACpWLjNeNCT0v1TY4gSD2kG_aS7vUN2jFmx2uKB=WgfKxi3Obw@mail.gmail.com
Whole thread Raw
In response to Re: CVS to In_list without dynamic SQL, how?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
Got it David, thanks!

On Wed, Dec 9, 2015 at 4:51 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, December 9, 2015, Michael Moore <michaeljmoore@gmail.com> wrote:
Very nice!
In my case the value being compared is numeric. I tried:
SELECT   to_char( 1 , '999') = ANY( string_to_array('1,2,3,4,5', ','));
but the result is FALSE


Make the array integer to match.

string_to_array(...)::integer[]

David J.



pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: CVS to In_list without dynamic SQL, how?
Next
From: Christopher Molnar
Date:
Subject: regexp_replace question/suggestions needed