Forum Discussion
CBH2021
Jul 05, 2021Copper Contributor
PowerShell Query for SQL
Hi All,
I'm running a query in PowerShell. the query has two commas
One wraps the query and the other (inside) wraps the DB_Name
when Running get an error
"0" argument(s): "Invalid column name ' DataBaseName'
"Load" with "1" argument(s): "Value cannot be null.
the same query running Perfect in SQL Management at the same Sql Comp same DB.
What do I need to do to make the query run without errors?
Last one...i'm not a DBA Person ... and can't expose the hall Query
thank you
CBH
- psophosBrass ContributorWithout some idea of the command that you are trying to execute we're just going to be randomly guessing.
When you say commas, do you mean quotes?
If so, put the double quotes " around the outside and use single quotes ' on the inside: 'DB_Name'.