keepingbusy
Programmer
Hi all
Can anyone suggest a sollution for the following?
In a table there are list of artists in a field called ARTISTTEMP and in a format such as DIAMOND,NEIL or ROSS,DIANA
I use the following to reverse the names and remove the comma with the result NEIL DIAMOND or DIANA ROSS
When a record contains more than one artist such as BENSON,GEORGE / JARREAU,AL I am getting results that look like GEORGE / JARREAU AL BENSON when it shoud read GEORGE BENSON / AL JARREAU
Is there a way to overcome this?
I am using Version 9
Thank you in anticipation.
Lee
Windows XP
Visual FoxPro Version 6 & 9
Can anyone suggest a sollution for the following?
In a table there are list of artists in a field called ARTISTTEMP and in a format such as DIAMOND,NEIL or ROSS,DIANA
I use the following to reverse the names and remove the comma with the result NEIL DIAMOND or DIANA ROSS
Code:
SCAN
STORE SPACE(100) TO mfull
STORE ARTISTTEMP TO mfull
STORE SPACE(50) TO nSplit, msur, mfor
nSplit = AT(",",mfull)
msur = LEFT(mfull, nSplit - 1)
mfor = SUBSTR(mfull, nSplit + 1)
REPLACE ARTISTTEMP WITH ALLTRIM(mfor)+" "+ALLTRIM(msur)
ENDSCAN
Is there a way to overcome this?
I am using Version 9
Thank you in anticipation.
Lee
Windows XP
Visual FoxPro Version 6 & 9