Basically when i query select * from [dbo].[vw_OrganisationSearch] where org = 'FIFA'
Id | Org | OrgSport | OrgType | OrgSector | OrgCategory | OrgTypeId | OrgSportId | OrgSectorId | OrgCategoryId | OrgLocationId | OrgLocation | OrgTypePrime | OrgSectorPrime | OrgCatPrime | OrgSportPrime | OrgAddressPrime |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35 | FIFA | Tennis | Federation | International | Grand Slam | 1 | 1 | 3 | 6 | 1194 | Zürich | NULL | 0 | NULL | 0 | 1 |
35 | FIFA | Tennis | Federation | Media | Grand Slam | 1 | 1 | 4 | 6 | 1194 | Zürich | NULL | 1 | NULL | 0 | 1 |
35 | FIFA | Tennis | Federation | International | Grand Slam | 1 | 1 | 3 | 6 | 119 | India | NULL | 0 | NULL | 0 | 0 |
35 | FIFA | Tennis | Federation | Media | Grand Slam | 1 | 1 | 4 | 6 | 119 | India | NULL | 1 | NULL | 0 | 0 |
35 | FIFA | Wrestling | Federation | International | Grand Slam | 1 | 2 | 3 | 6 | 1194 | Zürich | NULL | 0 | NULL | 1 | 1 |
35 | FIFA | Wrestling | Federation | Media | Grand Slam | 1 | 2 | 4 | 6 | 1194 | Zürich | NULL | 1 | NULL | 1 | 1 |
35 | FIFA | Wrestling | Federation | International | Grand Slam | 1 | 2 | 3 | 6 | 119 | India | NULL | 0 | NULL | 1 | 0 |
35 | FIFA | Wrestling | Federation | Media | Grand Slam | 1 | 2 | 4 | 6 | 119 | India | NULL | 1 | NULL | 1 | 0 |
Expected result when search Location = India
Id | Org | OrgSport | OrgType | OrgSector | OrgCategory | OrgTypeId | OrgSportId | OrgSectorId | OrgCategoryId | OrgLocationId | OrgLocation | OrgTypePrime | OrgSectorPrime | OrgCatPrime | OrgSportPrime | OrgAddressPrime | RowNum |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35 | FIFA | Wrestling | Federation | Media | Grand Slam | 1 | 2 | 4 | 6 | 1194 | Zürich | NULL | 1 | NULL | 1 | 1 | 1 |
Even if search is India the result should display with Prime Location which is zurich
Thanks for the help