Re: Using string variables in Select statements

From: William Robertson <williamr2019_at_googlemail.com>
Date: Sat, 3 May 2008 00:22:11 -0700 (PDT)
Message-ID: <accf488a-10d0-48d6-ac10-720696246d2f@f36g2000hsa.googlegroups.com>


On May 1, 4:07 pm, okumura-mik..._at_jvc-victor.jp wrote:
> I am attempting to use a variable in the WHERE clause of a SELECT statement.
> How would one pass a value for an IN statement, ie.
>
> SELECT *
> FROM inventory
> WHERE color IN ('red','green')
>
> If I replaced the last line with
>
> WHERE color IN (v_color)
>
> How would I set it?
>
> v_color := '"red","green"'
>
> doesn't work.

http://tkyte.blogspot.com/2006/06/varying-in-lists.html http://www.williamrobertson.net/documents/comma-separated.html Received on Sat May 03 2008 - 02:22:11 CDT

Original text of this message