Substring

From: bilal ghayyad <bilmar_gh(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Substring
Date: 2009-09-05 00:45:10
Message-ID: 15318.85292.qm@web53905.mail.re2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello;

I have an sql script function that take one text parameter "funct (text)", what I need to do is the following:

If the parameter name is string and its value was for example "abcd" then I need to do a query based on ab and then based on the abc, how?

Example:

SELECT * from voipdb where prefix like string

But I need the string to be ab and then to be abc? How I can assign the string to the first character and then to the first and second? In other words, how can I can take part of the string to do query on it?

Regards
Bilal

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Raj Mathur 2009-09-05 02:32:09 Re: Substring
Previous Message Simon Bateman 2009-09-04 05:36:10 Adding ENUM Type