Search

Technical : Query COACH HR data with correct formatting

Use the appropriate query statement to get the correct data formatting.

SELECT

STUFF(

( SELECT ',' + 'USA <USA@foo.com>'

FOR XML PATH('')

), 1, 1, '') AS [STUFF]

,

STUFF(

( SELECT ',' + 'USA <USA@foo.com>'

FOR XML PATH(''), TYPE

).value('.[1]', 'NVARCHAR(MAX)'), 1, 1, '') AS [FORMATSTUFF]

,

SUBSTRING(

( SELECT ',' + 'USA <USA@foo.com>'

FOR XML PATH('')

), 2, 9999) AS [SUBSTRING]

,

SUBSTRING(

( SELECT ',' + 'USA <USA@foo.com>'

FOR XML PATH(''), TYPE

).value('.[1]', 'NVARCHAR(MAX)'), 2, 9999) AS [FORMATSUBSTRING]

0 views

© 2020 Puumsoft Company Limited. All Rights Reserved.