String Position Function

Firebird apparently does not have a function to find one string inside another. How do I implement this? I have the Free_UDF library (FBUDF.dll) loaded into Firebird.

Example: How would you implement this type of SQL statement:
select email, pos('@',email) PE from table
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gskoczylasSenior Software DeveloperCommented:
There are two possible solutions. You can create selectable stored procedure and use build-in 'SUBSTRING(s from 1 for N)' to locate substring.

Another solution is using external function (User Defined Functions). It isn't hard task to write such UDF library with Delphi (or other language). On the page there are many UDF libraries. Some of them probably include such function (e.g.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nick UpsonPrincipal Operations EngineerCommented:
if you just want to know if one string contains another you can use "if (str1 CONTAINS(str2)) then" in a stored procedure

jmcglothlinAuthor Commented:
I will use the AdHoc UDF library - thanks much
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.