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

From David G. Johnston
Subject Re: CVS to In_list without dynamic SQL, how?
Date
Msg-id CAKFQuwZOf3r8C_h7Vbr7tU2wpPkptAJ9d76abaO-b6hYBUcTEA@mail.gmail.com
Whole thread Raw
In response to CVS to In_list without dynamic SQL, how?  (Michael Moore <michaeljmoore@gmail.com>)
Responses Re: CVS to In_list without dynamic SQL, how?
List pgsql-sql
On Wed, Dec 9, 2015 at 1:16 PM, Michael Moore <michaeljmoore@gmail.com> wrote:
DO $$declare
   csv text := '''1'',''2'',''3''';
  v_var text;
begin
    select var into v_var from tx_vendor where vendor_key in csv;
    RAISE NOTICE 'result=(%)', v_var ;
end$$;

Obviously the above does not work, but hopefully explain what I am trying to accomplish. 
Thanks,
Mike


​SELECT '1' = ANY(string_to_array('1,2,3,4,5', ','))

David J.​
 

pgsql-sql by date:

Previous
From: Michael Moore
Date:
Subject: CVS to In_list without dynamic SQL, how?
Next
From: Michael Moore
Date:
Subject: Re: CVS to In_list without dynamic SQL, how?