Database join "or" whereas clause

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 04:22 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 06:43 AM
Don't know if this will help but I recently learned that when joining tables in a db view you have to watch the Order. Your order values are all 100. To get it to join correctly you'll want to order the way you want the joins to work say 100, 200, 300. My joins didn't work properly until I ordered them. See if it works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 11:53 AM
I did try this, but am still getting the same syntax error. I've also tried using a space in front and behind of the double pipe (or) symbol.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 09:59 AM
I'm pretty sure you need to specify where clauses for each table in your view tables list. You only have a where clause setup for Resource Allocation. For example, the pm_project_task where clause would be tsk_sys_id = res_task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 01:39 PM