Обсуждение: function - string ends with

Поиск
Список
Период
Сортировка

function - string ends with

От
"Kevin Duffy"
Дата:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hello All:</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Is anyone aware of a function in PgSQL that will check if a string ends with a specific
string?</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I.e.   rposition(substring in string )  returns int</span></font><p class="MsoNormal"><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial">        Starts searching right to left within string</span></font><p class="MsoNormal"><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Thanks for your attention to this matter.</span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanstyle="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">KevinDuffy</span></font><p class="MsoNormal"><font face="Times New Roman"
size="3"><spanstyle="font-size: 
12.0pt"> </span></font></div>

Re: function - string ends with

От
"Kevin Duffy"
Дата:

Take a look at LIKE or ILIKE 

 

 

kd


From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Kevin Duffy
Sent: Friday, November 21, 2008 11:31 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] function - string ends with

 

Hello All:

 

Is anyone aware of a function in PgSQL that will check if a string ends with a specific string?

 

I.e.   rposition(substring in string )  returns int

        Starts searching right to left within string

 

 

Thanks for your attention to this matter.

 

 

Kevin Duffy

 

Re: function - string ends with

От
"Oliveiros Cristina"
Дата:
If I understand what you need,
I guess this clause does work.
 
 
WHERE string LIKE '%substring'
 
Best,
Oliveiros
----- Original Message -----
Sent: Friday, November 21, 2008 4:30 PM
Subject: [SQL] function - string ends with

Hello All:

 

Is anyone aware of a function in PgSQL that will check if a string ends with a specific string?

 

I.e.   rposition(substring in string )  returns int

        Starts searching right to left within string

 

 

Thanks for your attention to this matter.

 

 

Kevin Duffy