inner join without relationship

Posts   
 
    
mohsinkhan78 avatar
Posts: 4
Joined: 10-Oct-2012
# Posted on: 13-Jun-2013 18:19:30   

Hi,

I want to join two tables. but there is no relationship between two like:

SELECT * FROM tblGroups inner join tblPermissions on tblGroups.Id= tblPermissions.EntityId AND tblPermissions.Type='Groups'

basically we are storing different entities permissions in the tblPermissions

Many thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Jun-2013 20:08:38   

Are you joining to filter the resultset, or to return fields from both tables, or both?

mohsinkhan78 avatar
Posts: 4
Joined: 10-Oct-2012
# Posted on: 13-Jun-2013 20:13:42   

Thanks for your reply. I want to add this in my existing filter

Walaa wrote:

Are you joining to filter the resultset, or to return fields from both tables, or both?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Jun-2013 22:06:18