Skip to content
Advertisement

insert char into string at multiple positions sql

how would i like to convert accounting GL number

99999999999999999

to

999-99999-99-9999.999

in a query to MSSQL server 2005

i dont need to update the data, just have the STRING be converted on query.

Table: GLM_MASTER__ACOUNT Field: Account

thanks.

Advertisement

Answer

One more way using STUFF()

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement