Tentar;
EXEC('UPDATE '+ @tablename +
' SET filepath = '''+ @pathonlocal + ''' + file_name + '''+'.'+''' + file_ext')
Igual a;
UPDATE [YourTable] SET filepath = 'YourPath' + file_name + '.' + file_ext
EXEC('UPDATE '+ @tablename +
' SET filepath = '''+ @pathonlocal + ''' + file_name + '''+'.'+''' + file_ext')
UPDATE [YourTable] SET filepath = 'YourPath' + file_name + '.' + file_ext