Database View-Where Clause Not working

chaitanyaya
Tera Contributor

Team,

I am creating database view for two tables. cmdb_ci_hardware & Problem records with left join. 

It should show for how many CIs problem was raised plus rest of CIs (with no any problem ticket raise)

 

But its not showing any records.

 

chaitanyaya_0-1721193763702.png

 

1 ACCEPTED SOLUTION

Mark Manders
Mega Patron

Shouldn't it be 'hwd_sys_id=prb_cmdb_ci'? You are checking if the sys_id of the CI is the same as the sys_id of the problem. That will never be the case.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

6 REPLIES 6

Hi @Community Alums 

Thanks. I took sys_id & cmdb_ci and it worked. 

But left joint not working. Its showing only common records & not all records from hardware table. 

chaitanyaya_1-1721295820722.png

 

 

 

chaitanyaya
Tera Contributor

Hi All,

It worked by below way. 

chaitanyaya_0-1721302748008.png