I have this query:
INSERT INTO [clients] ([FirstName], [LastName])
SELECT FirstName, LastName
FROM OPENJSON(@JsonRequest)
WITH
(FirstName NVARCHAR(50),
LastName NVARCHAR(50)
)
Now I want to fill two more columns with ONE external parameter - @ID and one with a SQL Server function - CURRENT_TIMESTAMP. I can't figure out how to build the query
INSERT INTO [clients] ([FirstName], [LastName], [createdDate], [ID])
SELECT FirstName, LastName
FROM OPENJSON(@JsonRequest)
WITH
(FirstName NVARCHAR(50),
LastName NVARCHAR(50)
),
CURRENT_TIMESTAMP,
@ID
But this is not working...