Re: Insert based on whether string contains

2012-01-04 Thread bejoy_ks
Message- From: "Tucker, Matt" Date: Wed, 4 Jan 2012 08:56:44 To: user@hive.apache.org; Bejoy Ks Reply-To: user@hive.apache.org Subject: Re: Insert based on whether string contains The find_in_set() UDF is a safer choice for doing a search for that value, as %239% could also match 2390,

Re: Insert based on whether string contains

2012-01-04 Thread Tucker, Matt
The find_in_set() UDF is a safer choice for doing a search for that value, as %239% could also match 2390, which has a different meaning in Omniture logs. On Jan 4, 2012, at 8:46 AM, "Bejoy Ks" mailto:bejoy...@yahoo.com>> wrote: Hi Dave If I get your requirement correct, you need to l

Re: Insert based on whether string contains

2012-01-04 Thread Bejoy Ks
Hi Dave      If I get your requirement correct, you need to load data into video_plays_for_sept   table FROM omniture table only if omniture.event_list contain the string 239.   Try the following query, it should work fine.   INSERT OVERWRITE TABLE video_plays_for_sept SELECT concat(visid_high,