3 月
19
19
SQL SERVER 撈出資料列的值串成一行文字
declare @s nvarchar(4000)
select @s=isnull(@s+’;’ , ”)+ cast(resal001 as nvarchar)
from resal
where substring(resal001,1,1) in (‘C’,’E’,’H’,’I’,’J’,’R’)
and resal001 not in (‘CSB’,’H90′)
print @s
There are no comments.