Alter Procedure BulkInser AS Declare @sql nvarchar(1000) Declare @filename nvarchar(1000) Set @filename = cast(( SELECT TOP 1 Name FROM MyFiles ORDER BY Name Des