Welcome! Log In Create A New Profile

Advanced

Separating first and last names sql step 1

Posted by s2007 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Separating first and last names sql step 1
May 07, 2007 06:25PM
With some perseverance, I figured it out
Re: Separating first and last names sql step 1
May 08, 2007 11:29PM
SELECT patient_name,
instr(patient_name, ‘,’) as PositionOfComma
INTO Q19StepOne
FROM Patient;

Select Patient_name,
PositionOfComma,
mid( Patient_name, 1, PositionOfComma – 1) as
First_Name,
mid( Patient_name, PositionOfComma + 1) as
Second_Name
FROM Q19StepOne;

Not that it matters for the assignment now. It works, but is it most correct.
Sorry, only registered users may post in this forum.

Click here to login