- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi Guys ,
I just created a database view for reporting purpose, using demand and project table
in both table we have number is common
after giving clause when i hit try it , no records are coming, however we have records on that tables
how do i fix this ?
thanks for your help
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
your where clause is wrong
on dmn_demand table the field project refers to pm_project table
So update where clause on demand as this and remove the where clause from project table
dmn_project=pro_sys_id
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
the where condition should be like pro_demand = dmn_number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
your where clause is wrong
on dmn_demand table the field project refers to pm_project table
So update where clause on demand as this and remove the where clause from project table
dmn_project=pro_sys_id
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
See below for sample project and demand table records
'project' field in 'dmn_demand' table refers to 'sys_id' field of 'pm_project' table.
Change your query to dmn_project=pro_sys_id
If you are creating database views for reporting purposes, check if there is a need to create it in the first place. You can dot-walk on the related tables and show the information in dashboards and reports. In addition, you have various ways to group or manipulate the data without the need for view tables.
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Did you get a chance to review this ?
As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan