Database join "or" whereas clause

User147276
Giga Guru

I am trying to create a database join of 3 out of the box tables - resource_allocation, pm_project and pm_project_task, using the task field on the resource_allocation table as the connection.  The task on a resource_allocation can either be a PRJXXXX (pm_project) or a PRJTASKXXXX (pm_project_task).  I want to write the whereas clause as an "or" statement, so my data set will include resource allocations for BOTH projects and project tasks.  I'm not writing the "or" statement correctly (even though I'm using the || symbol) and hope someone can tell me what I'm doing wrong.  If I only join 2 tables it works fine (resource allocation to project for example), but I only get half the data that I need.  Thank you!

find_real_file.png

5 REPLIES 5

I am no longer getting a syntax error (thank you!), but I am not getting all the results I was expecting.  I'm only getting resource allocations to project tasks.  I also want to get resource allocations to projects within the same database view, hence the need for the "or" clause.  Thoughts?