Skip to content

Tag: sql

Poweshell retrieve sql query result

I am quite new to PowerShell. I have multiple SQL queries which I am executing from a PS script using SQL adapter. I need to retrieve the common results based on a column from the queries without changing existing queries or writing another one. How to achieve this with PowerShell using the results stored in …

What is mean name after variable name in t-sql

I have the next query: Сan you please explain what it means instruction: Is a variable called startdate assigned a different name? But why? Answer First, I would write this as: The two are equivalent, but this is clearer in intent (and less likely to cause problems). In any case, @startdate is not a valid col…

Change all bit columns to int with default value NULL

I have a database where we would store Yes/No questions as bits. However, as the project is going to a different path, we need to change all bit data types to int with default value NULL. Trying the following query, I get object is dependent of column error. To fix this I try doing: However, the fact that the…