We help IT Professionals succeed at work.

Formating field inside mysql query

rafaelrgl
rafaelrgl asked
on
290 Views
Last Modified: 2018-01-17
Hi, I have one field called seller, and inside I have those kind of values

JAMROZ,STOMP F & MARIA N
JOHN,FORD F
MARY, STEMP
PAUL, FORD & MARY N

So as you can see I have first name, last name ( maybe middle name), than i have & if there is another person, and aftert that First Name second person and Middle name last person. I need a way to extract those inside my query so i have something like this


select (conditions to get this) as Seller1First,  (conditions to get this) as Seller1Middle,  (conditions to get this) as  Seller1Last,  (conditions to get this) as Seller2First, Seller2Last from .......

This is MYSQL, but I added the sql topics too since is related.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2013
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thanks for your help. I have award the points because this is first part of that question. I have created another question with more 2 3 rules. I also update the sample, because is last, first second name format, and on the first question i put first, last sec. here is the link for second question: https://www.experts-exchange.com/questions/29011241/Formating-field-in-mysql-Advance-formatting.html

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions