Configure where clause in DataBase View

Leonel Sandroni
Tera Guru

Hello friends! I'm trying to set up a database view with demand table (dmn_demand) and project table (pm_project) because I need to sum some demands (filtering states) and projects without demands (demand field: empty) in order to show it in a report.

find_real_file.png

I don't know how to write the right "where clauses" to make this work.

1 ACCEPTED SOLUTION

Hi,

Good day!

Thanks for marking my response as helpful! Kindly mark it as correct and close this thread. It will be helpful for future readers.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

View solution in original post

3 REPLIES 3

Sagar Pagar
Tera Patron

Hi,

To join Project and demand table you have to use the common field.

example - Project have demand field, you can use in Demand where clause.

 

prj.demand = dmn.sys_id

 

For more details refer docs - Database view creation

Thanks,
Sagar Pagar

The world works with ServiceNow

Hi,

Good day!

Thanks for marking my response as helpful! Kindly mark it as correct and close this thread. It will be helpful for future readers.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

Yousaf
Giga Sage

Hi Leonal,

Check these links:

Filtering using the 'Where clause' in database views

Add a table to the database view

 

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***