In our SQL library we keep quite a few functions that get moved from project to project.
Today's example is the ddf_phone function. This function takes a phone number in the format of '12345678901234' and formats it to '(123) 456-7890 x1234'
That's the standard format in Dynamics GP