mysql - Advanced SQL Queries in Outsystems -


i have select list of projects user doesnot have access in given organization.

i tried query enter image description here

select {project}.[number],{project}.[name]  {project}  inner join {projectparticipant} on {project}.[id]={projectparticipant}.[projectid]  {project}.[tenant_id]=@tenantid , {projectparticipant}.[userid] <> @userid  group {project}.[number],          {project}.[name]  order {project}.[number] 

but here lists projects within given organization. missing basic. tried using left outer join no use. me out

it looks want rows in project table there no corresponding row in projectparticipant table given userid.

this should trick:

select {project}.[number],{project}.[name] {project} {project}.[tenant_id]=@tenantid , not exists (     select * {projectparticipant}      {project}.[id]={projectparticipant}.[projectid]     , {projectparticipant}.[userid] = @userid ) order {project}.[number] 

Comments

Popular posts from this blog

c# - Where does the .ToList() go in LINQ query result -

Listeners to visualise results of load test in JMeter -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -