More articles like this can be found on our SQL Data Access menu.
Dynamics GP stores phone number and Social Security Numbers without the dashes, this function will format an SSN for you
Use it like this:
select
lastname,
dbo.f_FP_SSN(socscnum)
as
SSN
from
dbo.upr00100