- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 10:29 AM
I have created a very simple database view on one table with a where clause to limit the data - but it doesn't work and I don't see why.
I'm using the Resource Plan table, and I want to eliminate all Operational resource plans - simple, right??
Can someone spot why this doesn't work?
My view:
The results:
Same limit on the table:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 11:59 AM
As a suggestion do below
Add same table again to the database view with order 200 & prefix as ris
Then use where clause as
r.sys_id=ris.sys_id && ris.plan_type!='operational_work'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 11:35 AM
The purpose of database at all is not being sufficied & neither is your business case.
I believe it is pulled it will via API all you need is to share the API details by applying appropriate filters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 11:45 AM
I appreciate your viewpoint, but the business requirement is to create a database view that will be pulled via an API, not get the data directly from the table.
Do you know why the database view is not working?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 11:52 AM
Unfortunately it will not work.
Database view is combination of two or more tables. So, the purpose itself is defeated if a single table is used.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 11:59 AM
As a suggestion do below
Add same table again to the database view with order 200 & prefix as ris
Then use where clause as
r.sys_id=ris.sys_id && ris.plan_type!='operational_work'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 04:13 PM
Thanks, I ended up doing something close to this. I just added another table that had a reference in the resource plan table and joined on the sys_id, it worked. I think your solution is probably cleaner, though.