Nov 12, 2019 08:55 AM|Yongqing Yu|LINK
I have written below code but it is giving error - Subquery returned more than 1 value
This question indicates that there is more than one return value of the filter condition after TransId.
At the beginning, you declared that the original query statement would only return one record.
I hope you can confirm the return record of the following statement?
select B.TransId from test0 as A
inner join test1 as B
on A.CardCode = B.Name
where A.CardCode = @accountId group by TransId -- how many records this statement return ?
Or I hope you can provide the table structure and data of test0 and test1 involved in your SQL statement, which will help us solve your issue easily.