The SCAN function will do this for the simple cases you have shown.
firstname=scan(name,2);
lastname=scan(name,1);
But things get very confusing if the last name has a space in it, or if the first name has a space in it. So, the above really doesn't constitute a real-word solution. You need to define the problem much more precisely.
-- Paige Miller
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.