...
select top 4
'Leistungserkl. '+ replace(replace(rtrim(cast(reach as char)), '0', ''), '1', '+ REACh SDB')+'' as Download, CONVERT(varchar(15), a.gueltigab, 106) as 'gültig ab', a.Identifikationsnummer as ' Ident.Nr. ', '' as ' ', rtrim(a.Bezugsnorm)+'
'+rtrim(a.Produkttyp) as 'Norm/Produktart ', a.CE as ' CE-Kennz.' ,''+rtrim(left(b.produkt,15))+'...' as Baustoff from view_produktfrei a join produkt b on a.prodid=b.id where (b.kennwort='' and b.grucode='' and b.prodcode='' ) or a.identifikationsnummer like '%§§§§§%' or a.prodid in (select id from produkt where kennwort+cast(grucode as char)+ cast(prodcode as char) in (select kennwort+cast(grucode as char)+cast(prodcode as char) from artikel where (('§§§§§'<>'§§§§§' and (ean='§§§§§' or lfart='§§§§§')) and (''='000000' or replace('', '0','')='' or kennwort='')))) order by gueltigab desc