You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is example that uses variable substitution (same SQL script also attached below). It inserts a new row where the First_Name variable does not get substituted (but LastName variable works ok):
DECLARE @FirstName VARCHAR(255)='#{First_Name}' -- underscore causes some issue
DECLARE @LastName VARCHAR(255)='#{LastName}' -- this works (no underscore)
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Employee]') AND type in (N'U'))
CREATE TABLE [dbo].[Employee]( FirstName varchar(20), LastName varchar(20));
INSERT INTO dbo.Employee(FirstName, LastName) VALUES(@FirstName, @LastName)
Here is example that uses variable substitution (same SQL script also attached below). It inserts a new row where the First_Name variable does not get substituted (but LastName variable works ok):
SQLQuery1.zip
Related PowerShell commands (tested with v0.7.0 dbops module):
The text was updated successfully, but these errors were encountered: