比如将C:/test/*.txt全部作为附件发送,求高手指导。
另外,如果不用SP,SSIS能完成以上功能么?
------解决方案--------------------
if OBJECT_ID('tempdb..#dir') is not null
drop table #dir
create table #dir
(
dir varchar(1000),
depth int,
is_file int
)
insert into #dir
execute master..xp_dirtree 'c:',1,1
declare @s varchar(8000)
select @s = ISNULL(@s+',','')+dir from #dir
where dir like '%.bin'
print @s