I'm trying to insert 2 records into 2 tables by using a subquery, but it gives me a syntax error.
Msg 156, Level 15, State 1, Line 4 Incorrect syntax near the keyword 'INSERT'. Msg 102, Level 15, State 1, Line 4 Incorrect syntax near ')'.
The query that I'm trying to execute is
INSERT INTO [Files] ([FileTransformationId],[FileTypeEnumId])
VALUES
(
(INSERT INTO [FileTransformations] OUTPUT INSERTED.FileTransformationId DEFAULT VALUES),
2
)
Is this possible?