I Have two tables named account and assignedgroup. In account table there are two columns named ID and sourceaccount and In assignedgroup I have two columns named ID and assignedgroup.
I want to select ID by joining account and assignedgroup tables. I did something like this:
select a.ID
from account a
left outer join assignedgroup b
on a.sourceaccount = b.assignedgorup
But I get Null as output the reason being that The values in sourceaccount are like this
sourceaccount:
sample
sample
and whereas the values in assignedgroup are like this
assignedgroup:
sample-L1
sample-P-L1
Can anyone help me on how to join these two tables?
I want to get all the ID’s whenever there is a sample value in both sourceaccount and assignedgroup.
It is comparing sample with sample-L1 since those are not equal it is returning null but I want the ID even if it has values like that. I mean if somepart of the column values matches then also I want those values to be displayed
1 Answer