Check whether two strs have at least one shared character.

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Check whether two strs have at least one shared character.
Date: 2007-07-03 13:48:02
Message-ID: 468A5392.6020002@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Is there a simple way/command/function to check whether two strings have
at least one overlap character please?

For example,

str1: 05baaa
str2: ooboo

Query: select str1 ??? str2 ;

Result: true

Because b is in both str1 and str2.

Thank you!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2007-07-03 14:50:15 Re: Check whether two strs have at least one shared character.
Previous Message Raymond O'Donnell 2007-07-03 13:01:14 Re: how to: psql -U user --password password ?