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 > General > Database Concepts & Design > I need a tool to break up my data. Help please

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-22-07, 16:41
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 791
I need a tool to break up my data. Help please

Hello everyone, I have a record set with about 2000+ records that I need to insert into a db. One of the columns contains area codes WITH phone numbers formatted as such:
Code:
555-321-1212
I have to break out the first 4 characters which would be the area code and the hyphen and move only the first 3 into another column. The hyphen will just get discarded.

Is there a tool or some concept that someone can point me to so that I can complete this? I don't want to do this by hand. Thanks for the help. Frank
Reply With Quote
  #2 (permalink)  
Old 05-22-07, 19:58
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
i would use the SUBSTRING function in a query
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 05-22-07, 20:05
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 791
Quote:
Originally Posted by r937
i would use the SUBSTRING function in a query
Rudy, your the best! Thanks!
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