TheLazyPig
Programmer
Hi!
I have a set of names. Is it possible to separate it from different columns?
Thank you!
I have a set of names. Is it possible to separate it from different columns?
Thank you!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT MYTABLE
GO TO
DO WHILE .NOT. EOF()
REPLACE LASTNAME WITH GETWORDNUM(NAME,1)
REPLACE FIRSTNAME WITH GETWORDNUM(NAME,2)
REPLACE MIDDLENAME WITH GETWORDNUM(NAME,3)
REPLACE GENNAME WITH GETWORDNUM(NAME,4)
SKIP
ENDDO
SELECT MYTABLE
REPLACE ALL LASTNAME WITH GETWORDNUM(NAME,1), FIRSTNAME WITH GETWORDNUM(NAME,2), MIDDLENAME WITH GETWORDNUM(NAME,3), GENNAME WITH GETWORDNUM(NAME,4)
Somebody wrote a great article about this some years ago that included a set of tables that helped with American names. I can't remember who wrote it or where it appeared, but maybe someone else here will have their memory jogged by this.
The moral: Don't rely on an algorithm when dealing with something as sensitive as people's names.
Select GETWORDCOUNT(namefield), Count(*) as NumRecords FROM thetable Group By 1