pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Rusa <christian@rusa.at>
To: pgsql-sql@postgresql.org
Subject: Closes Match
Date: Mon, 25 Jul 2005 19:31:11 +0200
Message-ID: <42E521DF.4000804@rusa.at> (raw)

Hi there,

I want to match a string against the database and get the closest 
(shorter) match.
I was asking myself if its possible to realise this in SQL.

So if the string is:
abcdefg

And in the database are entries like:
a
ab
abc

I just want to get back 'abc'.

I looked around in the internet and the documentation but found no solution.

Cheers Christian

Attachments:

  smime.p7s (application/x-pkcs7-signature, 3.1K) download

view thread (3+ messages)  latest in thread

Message-ID: <42E521DF.4000804@rusa.at>
Permalink:  ../42E521DF.4000804@rusa.at/
Also on:    postgresql.org/message-id/42E521DF.4000804@rusa.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: christian@rusa.at
  Subject: Re: Closes Match
  In-Reply-To: <42E521DF.4000804@rusa.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox