Hi
Select distinct T0.code,T0.Name
from Item T0 where T0.ItemCode = (Select distinct(Itemcode) from Item2)
Thanks
Hi
Select distinct T0.code,T0.Name
from Item T0 where T0.ItemCode = (Select distinct(Itemcode) from Item2)
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Anandu G NathPosted Jan 24, 2024, 7:01 AM
Rewrite the code using below syntax
Syntax:
Give conditions to subquery
Onkar SharmaPosted Dec 24, 2022, 3:19 PM
Hi Ramco,
I totally agree with Anoop, you need to use the "IN" operator otherwise it will give you a "Subquery returned more than 1 record" error message.
When the subquery returns more than 1 value, you must use the IN operator:
Syntax:
Query:
To know more about SQL Server Subqueries, visit:
Thanks!
Uday DodiyaPosted Aug 31, 2022, 7:11 AM
Asma KhalidPosted May 23, 2022, 5:05 AM
Nitin SontakkePosted May 20, 2022, 5:19 PM
Jignesh KumarPosted May 20, 2022, 3:30 AM
Sachin SinghPosted May 19, 2022, 4:56 PM
Ramco RamcoPosted May 19, 2022, 4:21 PM
Hi ANoop
Actually i want those code which have different in tbl2 of that ItemCode Unique.
Thanks
Anoop Kumar SharmaPosted May 19, 2022, 4:02 PM
Anoop Kumar SharmaPosted May 19, 2022, 3:56 PM