Ok that did work. Thanks.
When using this on a large table, would it slow the query down a lot?
-----Original Message-----
From: Chris
[mailto:oracledba-ezmlmshield-x47346020.[Email address protected]
Sent: Tuesday, August 29, 2006 11:54 AM
To: LazyDBA Discussion
Subject: RE: sql help
select substr('bob smith',1,instr('bob smith',' ',1)-1) from dual
/
-----Original Message-----
From: Jeff Chirco
[mailto:oracledba-ezmlmshield-x39232331.[Email address protected]
Sent: Tuesday, August 29, 2006 11:41 AM
To: LazyDBA Discussion
Subject: sql help
I have a field in my database that stores the full First and Last name
like BOB SMITH.
I want to write a sql statement that will return everything in front of
the space. So I just want to return the first name BOB. How can I do
this in 9i? Or can it only be done in 10g with regular expressions?
Jeff
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
Douglas County, Oregon
www.co.douglas.or.us
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page