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 May 9th, 2005, 10:00 AM
david6666666 david6666666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 33 david6666666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 41 sec
Reputation Power: 5
Oracle Transformation HELP!!

Hi,

How do I extract elements of a text field?
For example, In my customer table I have an attribute called CustAddress with example data: "17 Good Street, Manhattan, NY, 30004"

I want to extract those data into another table without losing any data to having attributes for each address detail, like, CustStreet, CustSuburb, CustState and CustZipCode.

How can I extract "17 Good Street" and put it into CustStreet attribute and so forth? Get what I mean?

Reply With Quote
  #2  
Old May 9th, 2005, 10:11 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,826 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 1 Day 9 h 59 m 53 sec
Reputation Power: 278
Read this for instructions about substring and instring functions, then buid a view with the desired details.

Reply With Quote
  #3  
Old May 10th, 2005, 11:04 PM
david6666666 david6666666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 33 david6666666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 41 sec
Reputation Power: 5
Quote:
Originally Posted by pabloj
Read this for instructions about substring and instring functions, then buid a view with the desired details.


Also how would you go about extracting an element of a text field and tranferring it into a number?
For example:

address="13 good st, NYC";

I want to extract the text "13" and changing its data type to a number, how can i do it?
Do i extract it by using substring function and put it into a temporary attribute then alter its data type then? or is there a more efficient way of doing this?

Thanks

Reply With Quote
  #4  
Old May 11th, 2005, 03:06 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,826 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 1 Day 9 h 59 m 53 sec
Reputation Power: 278
You need to CAST it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Oracle Transformation HELP!!


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