Skip to content

Navigation Menu

Sign in
Sign up

Welcome to SimplySql Discussions! #74

Discussion options

👋 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.
You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

HI how can we import the .sql file like -InputFile to run the schema file,
i want to run schema for postgresql please help

You must be logged in to vote
2 replies
Comment options

mithrandyr Mar 25, 2023
Maintainer Author

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
Comment options

Hi Mithrandyr

Thanks you so much its working as expected
really appreciate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /