• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Seperating data

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does oracle or SQL have any special functions for seperating data that are already in columns?
Example:
In my oracle database I have a column named AUTHOR which recieved values like 'JoeTheAuthor, 1998.' when I loaded everything in from a tab delimited file. I am in the process of normalizing all the tables and that calls for splitting up the data in that column into two seperate columns. How do I get the year out of the column to put it in another column and then delete the year, comma and period out of the AUTHOR column?
Thanks in advance.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i hope this will help you.
select substr(author,1,instr(author,',')-1),substr(author,instr(author,',')) from dual
ali
 
Rob Lyon
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ali, it worked great.
 
reply
    Bookmark Topic Watch Topic
  • New Topic