Database view for sysapproval and change request tables?

therese_erickso
Kilo Explorer

I am attempting to create a database view for the first time and struggling to join the sysapproval_approver table and the change_request table.

So far everything I have tried as returned no results. Can anybody walk me through this?

Thanks.

1 ACCEPTED SOLUTION

Amend "chg_number" to "chg_sys_id"



chg_number is a string field where appr_sysapproval is a reference field and is expecting a sysID



Pete


View solution in original post

7 REPLIES 7

geoffcox
Giga Guru

I was able to do it in on my developer instance.



I created a new database view.


I added the change_request and sysapproval_approver tables to the view, with the prefixes "cr" and "ap" respectively.


On the change_request table, I added the following fields: sys_id and number.


On the sysapproval_approver table, I added the following fields: sysapproval and approver.


The where clause on the sysapproval_approver table is: ap_sysapproval = cr_sys_id



Works like a charm!


Thanks Geoff!


Hi Geo,



I created database view as you have mentioned and it worked fine.


Now I want to have approval groups also from sysapprover_group table.How can I achieve this.



Thanks in advance.