If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Oracle Newbie

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-12, 21:47
Oracle_NewB Oracle_NewB is offline
Registered User
 
Join Date: Feb 2012
Posts: 2
Oracle Newbie

Need help with a query:

Let's say we have

Table A with 3 columns
FirstName - contains null values
LastName - contains null values
FullName - contains first and last name (ex. John Smith)

I need a query that will copy John into FirstName and Smith into LastName.
This needs to be applied to more than one row.

Please assist at your earliest convenience.

Thanks.

Oracle_NewB
Reply With Quote
  #2 (permalink)  
Old 02-02-12, 22:02
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
will FullName ever contain more than one space character?

The design is flawed & does not conform to Third Normal Form
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #3 (permalink)  
Old 02-02-12, 22:17
Oracle_NewB Oracle_NewB is offline
Registered User
 
Join Date: Feb 2012
Posts: 2
What we know for a fact is there is a space between first and last name and then empty spaces after the last name.
Reply With Quote
  #4 (permalink)  
Old 02-02-12, 23:27
anacedent anacedent is offline
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
use INSTR() & SUBSTR() functions
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Reply With Quote
  #5 (permalink)  
Old 02-03-12, 09:38
beilstwh beilstwh is offline
Lead Application Develope
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,222
and the ever popular trim
__________________
Bill
You do not need a parachute to skydive. You only need a parachute to skydive twice.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On