Is there any Alternate for CONTAINS function in vertica DB?

Moderator: NorbertKrupa

Post Reply
gvkiranreddy
Newbie
Newbie
Posts: 9
Joined: Tue May 21, 2013 7:09 am

Is there any Alternate for CONTAINS function in vertica DB?

Post by gvkiranreddy » Thu Jul 11, 2013 9:57 am

Is there any Alternate for CONTAINS function in vertica DB?

Hi,

I would like use contains function in vertica to do text search, i got to know it is not avail in vertica, is there any alternative instead of this one? if any can you please let me know? I would like search like below:

for example:

SELECT ID, TEXT FROM ABC.SRVC_TKT WHERE TEXT=('LAPPEE' AND 'CHARGER' OR 'WIRE' |'BATTERY' AND 'BAG'|'ANY' AND 'ACCESSORIES')'

Thanks & Regards,
Kiran

User avatar
nnani
Master
Master
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am
Contact:

Re: Is there any Alternate for CONTAINS function in vertica

Post by nnani » Thu Jul 11, 2013 10:32 am

Hello,

You can use regular expressions for this
The function is regexp_like.

Go through this topic, You can find some hints.
http://www.vertica-forums.com/viewtopic ... like#p3424

Hope this helps.. :)
nnani........
Long way to go

You can check out my blogs at vertica-howto

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1811
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Is there any Alternate for CONTAINS function in vertica

Post by JimKnicely » Thu Jul 11, 2013 12:37 pm

See my response in this thread: viewtopic.php?f=75&t=1168
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica Database Development”