Просто объедините его в строку. Вам просто нужно привести ваши числовые значения к VARCHAR.
select 'VendorID = ' + CAST(v.vendorid AS VARCHAR(10)) + ' Count ' + CAST(count(i.invoiceid) AS VARCHAR(10)) +
' Invoice Totals = ' + FORMAT(sum(i.invoicetotal), 'c2')
from vendors v JOIN invoices i on i.vendorid = v.vendorid
group by v.vendorid
С этим примером данных:
create table vendors (vendorid int)
create table invoices (vendorid int, invoiceid int, invoicetotal money)
insert into vendors values (34)
insert into invoices values (34, 1, 1000), (34, 2, 200.12)
Возвращает:
VendorID = 34 Count 2 Invoice Totals = $1,200.12