On Fri, 12 Aug 2005 12:49:28 -0700, Joey Martin <jo**@infosmiths.net> wrote:
Pretty basic but I cannot figure it out.
Column:
FULLNAME (lname, fname)
Needs to be
FNAME
LNAME
Should split at the comman. I already have all the columns created; just
need to SQL command to make it happen. Thanks!!
*** Sent via Developersdex http://www.developersdex.com ***
To do it at the database level is database specific, but in general:
select substr(FULLNAME,Instr(FULLNAME,",") +1) First_Name,substr(FULLNAME,1,Instr(FULLNAME,",") -1) Last_Name
from table
Your exact systax will vary but basically you need to find the position of the , and use the string functions of your
database to split it as needed.