Created
May 26, 2017 20:19
-
-
Save dperussina/3d38765962e12ac6cf41daab9c65a431 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stuff((SELECT ' ' + B.reference | |
FROM tagnet_appointmentspn_partnerorderadditionalreferences B | |
WHERE B.partnerprimaryorderid = headers.partnerprimaryorderid | |
AND B.referencetype = 'CR' | |
AND LEFT(B.reference, 1) NOT IN ( '0', '1', '2', '3', | |
'4', '5', '6', '7', | |
'8', '9' ) | |
FOR xml path('')), 1, 1, '') AS 'PARTNER NAME', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(SELECT addref2.reference from tagnet_appointmentspn_partnerorderadditionalreferences as addref2 where addref2.referencetype in ('cr') | |
and left(addref2.partnerprimaryorderid,1) not in ('0', | |
'1', | |
'2', | |
'3', | |
'4', | |
'5', | |
'6', | |
'7', | |
'8', | |
'9')) as 'PARTNER NAME', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment