0
select ut.Userguid
,ui.MobileNo
from userTryInfo ut
left join userInfo ui on ui.Userguid= ut.Userguid
0
If you just say "its not a perfect query" how exactly we are suppose to be helping you?
As Suvendu mentioned, please give some sample data.
Now I don't know what is stored in MobileNo column in userTryInfo. You might have stored one space there (' '). If that is the case, the query given by me will definitely not work. But how will know what you have stored.
So, please help us help you!
0
If mobileNo in userTryInfo is an empty string, then try following:
select ui.id
,ui.MobileNo
from userInfo ui
left outer join userTryInfo uti on ui.id = uti.id
where nullif(uti.MobileNo, '') is null
0
I hope I am getting it right. My interpretation is, get all records from userInfo table where there is no matching record in userTryInfo. Basically it's an unmatched query.
Try following:
select ui.id
,ui.MobileNo
from userInfo ui
left outer join userTryInfo uti on ui.id = uti.id
where uti.MobileNo is null
0
Usertryinfo :
Userguid | Mobileno |
EB8C3FC7-0BD1-435D-852D-F61643F65BB0 | |
03868C93-9121-42D0-B3FB-CEF972B69CEE | |
in the table userinfo has the mobileno
i need all the mobilenos respective of ids from userinfo.
0
What is the desired result you need exactly?
Can you share 1-2 sample records which you want to see as result?