hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Xu <neil.x...@gmail.com>
Subject Re: IN clause usage in "where"
Date Tue, 12 Oct 2010 01:42:10 GMT
you can try find_in_set(string str, string strList) , ex.

*select col1 from table1 where find_in_set(col1, 'abc,xyz')<>0;*

if col1 has NULL values, it can be modified as

*select col1 from table1 where find_in_set( *coalesce(*col1,'') ,
'abc,xyz')<>0;*

the details about find_in_set are at
https://issues.apache.org/jira/browse/HIVE-688

Neil


2010/10/12 Karthik <karthik_swa@yahoo.com>

> Is there a way I can use the "in" list of values in a query condition like
> "select col1 from table1 where col1 in ('abc','xyz')"?
>
> I use Hive 0.6.
>
> Regards,
> Karthik.
>
>

Mime
View raw message