I want to execute this query :
INSERT INTO [Order] (FactorId, ProductId, Entity)
VALUES((SELECT Top 1 FactorId FROM Factor WHERE UserId = @UserId AND Status = -1), @ProductId, @Entity)
but the following error occurs :
Subqueries are not allowed in this context. Only scalar expressions are allowed.