declare @i int
declare @fileName varchar(100)
declare @sql varchar(1000)
set @i = 0
begin
while @i < 10
begin
set @fileName = 'z:\c\fd35434' + convert(varchar(10), @i) + '.csv'
set @sql = 'BULK Insert dbo.input From ' + @fileName +
' WITH (
FIELDTERMINATOR = '','',
ROWTERMINATOR = ''\n''
)'
print @sql
exec(@sql)
set @i+=1
end
end