From: bilal ghayyad <bilmar_gh@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Substring
Date: Fri, 4 Sep 2009 17:45:10 -0700 (PDT)
Message-ID: <15318.85292.qm@web53905.mail.re2.yahoo.com> (raw)
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
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: bilmar_gh@yahoo.com
Subject: Re: Substring
In-Reply-To: <15318.85292.qm@web53905.mail.re2.yahoo.com>
* 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