Q:

SQL Server Insert JSON data with other external parameters

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...

A:

I think you just need to move the columns to the select part
INSERT INTO [clients] ([FirstName], [LastName], [createdDate], [ID])
    SELECT
        FirstName, LastName, CURRENT_TIMESTAMP, @ID
    FROM OPENJSON(@JsonRequest)
    WITH (
            FirstName NVARCHAR(50),
            LastName NVARCHAR(50)
         )

