-
Notifications
You must be signed in to change notification settings - Fork 29
Welcome to SimplySql Discussions! #74
mithrandyr
announced in
Announcements
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
- Ask questions you’re wondering about.
- Share ideas.
- Engage with other community members.
All reactions
Replies: 1 comment 2 replies
HI how can we import the .sql file like -InputFile to run the schema file,
i want to run schema for postgresql please help
All reactions
2 replies
Read the file into a variable and pass the variable to Invoke-SqlUpdate -Query. The module focuses on doing one thing very well and lets other powershell cmdlets/modules handle other tasks, like reading text from a file.
$pathToFile = "c:\somepath\somefile.sql" $fileContents = Get-Content -path $pathToFile Invoke-SqlUpdate -query $fileContents
All reactions
Hi Mithrandyr
Thanks you so much its working as expected
really appreciate
All reactions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment