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: help with sql

Re: help with sql

From: gazzag <gareth_at_jamms.org>
Date: 6 Jul 2006 04:14:04 -0700
Message-ID: <1152184442.743052.316290@m79g2000cwm.googlegroups.com>


Brian (withholding surname) wrote:

> Hi, I am using Java to query 10g database. I have table containing this
> information
>
> ID EMAILTO
> ---- ---------------------------------
> 1 Sangster, Derek; Williams, Mary G; Phillpot, Mark
> 17 Williams, Mary G
> 29 Cunningham, Peter; Richards; Peter
>
> I want to turn this into columns LASTNAME and FIRSTNAME
> 1 Sangster Derek
> 1 Williams Mary G
> 1 Phillpot Mark
> 17 Williams Mary G
> 29 Cunningham Peter
> 29 Richards Peter
>
> I am query database so can only use SQL and not procedures PLSQL. How
> can I do this? URGENT.
>
> Brian

Nice surname...

Anyway, look up usage of the two SQL built-in functions SUBSTR and INSTR in the SQL Reference manual:

http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm

HTH -g Received on Thu Jul 06 2006 - 06:14:04 CDT

Original text of this message

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