Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

REPLACE or alternative?

$
0
0
Morning!An attribute comes back with five answers.NULLP=PermanentT=TemporaryB=Both8=See Job DescriptionUsing the line below I receive a value of PermanenTemporary as the t at the end of Permanent is being replace with Temporary.How can I stop this from happening and have them show their own individual values?[code="sql"]replace(replace(replace(replace(Orders.ptemp, 'P', 'Permanent'), 'T', 'Temporary'), 'B', 'Both'), '8', 'See Job Description') AS 'Perm or Temp'[/code]Thank you!

Viewing all articles
Browse latest Browse all 3145

Trending Articles