oracle query

can  you please advise how can i get the number part from the following string.



i want to extract and check in where condition only the number that 1589 after :
Sarma VadlamaniprogrammeranalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

johnsoneSenior Oracle DBACommented:
Are you looking for everything after the colon?  That would be:

substr(your_column, instr(your_column, ':')+1)

Or, do you need to check that it is all numbers?
is the colon variable?  that is, could it be some other delimiter?
if the number you want is always the end of the string then try this...

Sarma VadlamaniprogrammeranalystAuthor Commented:
and regexp_substr(SQL_BIND,'[0-9]+$')=NVL(TO_NUMBER(:P_emp_no),emp.empno)
passing as parameter and trying where clause not returning any rows
but if i enter

regexp_substr(SQL_BIND,'[0-9]+$')='1001' then returning rows of empno 1001.
tried to convert to char but no use.
please advise.
awking00Information Technology SpecialistCommented:
Did you try the other way around?
and to_number(regexp_substr(SQL_BIND,'[0-9]+$'))=NVL(TO_NUMBER(:P_emp_no),emp.empno)

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
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
Oracle Database

From novice to tech pro — start learning today.