i have the following piece of code
select
(
select cast(Narrative as Varchar(max)) + char(13)
from officeclientledger
where ptmatter=$matter$ and ptTrans=4
for xml path (''), type
)
which deliver results such as:
Cwm Taff NHS Trust Medical Records

 ; Dr Purby Medical Records 
 ;
(excluding spaces, needed to insert for the purpose of asking the question)
however, is there a way of delivering the results such as
Cwm Taff NHS Trust Medical Records
Dr Purby Medical Records
This can’t be done using the results to grid functionality in SSMS. However, if you use the results to text option and replace your CHAR(13) with CHAR(10), you’ll get the desired results.