Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: extracting data from a table

Re: extracting data from a table

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Tue, 10 Jun 2003 14:29:03 -0500
Message-ID: <vubcevc6rj7i2a9lq1qb5r8ep8t32orhe9@4ax.com>

Oracle has the tools you need,..SqlPlus can handle this - Use the substr,instr functions to parse the data like

Select substr(name,Instr(name,",") +1) As "First Name",substr(name,1,instrtr(name,",") -1) As "Last Name", substr(ss,instr(ss,"-",1,2)+1) As "Last 4 SSN", etc.... ( Middle names can be a problem but you can check for any characters after a space and use those as the Middle Name ( of if length is only 1, then Middle Initial)

You get the idea...

"Rajiv Gangadharan" <rajiv_gangadharan_at_sancharnet.in> wrote:

>This task can be done using a programming language like perl (DBI).
>
>"rishi" <richadha_at_hipusa.com> wrote in message
>news:d1741a2f.0306100557.7c556527_at_posting.google.com...
>> Folks
>>
>> I have to extract data from a table in the HR database.
>>
>> The columns in the table are Name, DOB, SS, STATUS and the data appears as
>such:
>> NAME DOB SS STATUS
>> doe, john 01/01/77 11-11-1111 A
>>
>>
>> The data needs to be placed in the following format:
>>
>> Last Name First Name Last 4 SS Month Year Status
>> Doe John 1111 01 77 A
>>
>>
>> The process needs to run every day.
>> How can I get these results?
>>
>> Thanks in advance
>

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- Received on Tue Jun 10 2003 - 14:29:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US