Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 21st, 2004, 10:53 AM
umuayo umuayo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 umuayo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Get Numbers when characters found

Hello
Is there a function in ORACLE that you could use to get say

the coulmn has 5474kkkkdkMKDKKD, you only extract 5474.

OR

IF you encounter 54//d773hms--kd in the column, then you extract only 54.

Thanks

Reply With Quote
  #2  
Old October 21st, 2004, 01:49 PM
jiggee jiggee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 27 jiggee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 27 sec
Reputation Power: 0
Here you go
1)
select translate('sdfsdf4545dsafasd1232312','0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ','0123456789') from dual;
Result : 45451232312


2)
select translate('sdfsdf4545dsafasd1232312','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ','x') from dual;

Result: 4545xx1232312

With the second query you could use another functions(decode,substr...etc) and it will return all the characters before the occurence of the 'x'..

Also if you have characters other than the alphabets just add them to the long abc....string

hth,

Jiggee

Last edited by jiggee : October 21st, 2004 at 01:50 PM. Reason: Extra info

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Get Numbers when characters found


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT