Run a script multiple times based on lines in a file #390
simonsabin
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Loading data can be a pain, especially if you want to run a script for every piece of data.
Currently you have to do that in the scripting shell, this means that
Proposal would be to do something like
` sqlcmd -mf MyVars.json -Q "CREATE LOGIN [$(User)] FROM WINDOWS';
GO
-- Creates a database user for the login created above.
CREATE USER AbolrousHazem FOR LOGIN AbolrousHazem; `
when MyVars.json is
is effectively the same as
A similar experience could be achieved with a CSV file.
Beta Was this translation helpful? Give feedback.
All reactions