I wanna do something like this:
insert into TableA
(val1,val2)
values
("value",(select top 1 tableB.X from tableB where tableB.Y=@Y))
I get this error:
Subqueries are not allowed in this context. Only scalar expressions are allowed
How to stop that error?