I try this query on SQL Server but I got an error
Conversion failed when converting the nvarchar value ‘Trên bàn ‘ to data type smallint.
I knew that because the subquery could not return a value, but when I run the subquery independently, I will got the right value. I don’t know why, explain for me please, thank you so much.
enter image description here
this is the result when I query subquery indepently
enter image description here
I just want to have the result after query the full query(if I change the convert function to Try_convert it will return right result).
enter image description here
tran rin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4