database view to join change and outage table

Gaurav Vaze
Kilo Sage

Hello all
I have a requirement of creating a report on a database view which comprises of fields from change (change_request) and outage table (cmsb_ci_outage)
I was able to create a database view but when I try to create a report on that I do not get the fields in filtering condition
I'm not sure if my WHERE clauses are right
I have left the WHERE clause as blank in the change table
while  for the outage table the where clause is as follows

GauravVaze_0-1717396960426.png



I am new to database views so any help will be appreciated

3 REPLIES 3

Community Alums
Not applicable

Hi @Gaurav Vaze ,

You can try with task sys id as the primary key over task number.

 

Jitendra Diwak1
Kilo Sage

Hi @Gaurav Vaze,

 

Your database is correct and as checked, you do not have record in Outage table associated with Change. for testing purpose, you could pick record in outage table from Change table and save it then you will get one record. And there is field on View tables is Left Join false means it will show only those record are associated with Change record in Outage table and if it is true then it show all record from both table.

 

JitendraDiwak1_0-1717399579888.png

 

Please accept my solution if it works for you and thumps up.

 

Thanks

Jitendra

 

Please accept my solution if it works for and thumps up.

Hi @Gaurav Vaze,

 

Did my solution helped you?

Please accept my solution if it works for you and thumps up.

 

Thanks

Jitendra

Please accept my solution if it works for and thumps up.