DECLARE @query AS nvarchar(1024);
SET @query = N'CREATE VIEW WomanAward AS
SELECT * FROM [Сотрудники]
WHERE [Пол] = ''Ж'' AND [Премия] BERWEEN 130 AND 210';
EXEC sp_executesql @query;
-- EXEC(@query);
dataAdapter = new SqlDataAdapter("Имя процедуры", connectionString);
dataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
var connection = new SqlConnection(connectionString);
// connection.Open();
var cmd = new SqlCommand("Имя процедуры", connection);
cmd.CommandType = CommandType.StoredProcedure;
dataAdapter = new SqlDataAdapter(cmd);
@echo off
for /r C:\путь к папке с файлами .sql %%g in (*) do SQLCMD.EXE -d [в какой базе выполнить запросы] -i "%%~nxg" -o "%%~nxg.log"