Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Oracle/OAS
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Oracle/OAS
substr in oracle
Vallaru smitha
Ranch Hand
Posts: 87
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
xyz@yahoo.com
Can anyone please help to extract yahoo from above
string
.
Thanks
Fatih Keles
Ranch Hand
Posts: 182
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can use a combination of substr and instr. Something like this.
select substr('xyz@yahoo.com',instr('xyz@yahoo.com','@')+1,instr('xyz@yahoo.com','.')-instr('xyz@yahoo.com','@')-1) from dual
But you may need to improve to handle repeating '.'
Christophe Verré
Sheriff
Posts: 14691
16
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Note that Oracle supports regular expressions (REGEXP_LIKE), so if you can come up with a regular expression to extract that part, you'll probably be able to use it with Oracle.
[My Blog]
All roads lead to JavaRanch
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
SCJP 1.5 review - not a so good test?
design the Java swing with dynamic creation of JTextfield,JLabel,Jcombobox
NX: Reading from the DB
Weird error
TOMCAT Environmental Variables
More...