Database view between Problem and Problem task

annmol1
Kilo Expert

Hi there,

I need to create a database view between Problem and Problem task tables. tried conditions nion where clause with prb_sys_id = ptsk_parent and prb_number = ptsk_problem; prb and ptsk being variables for Problem and Problem task tables. I get all the Problems returned, but no Problem task number against them. Can somebody help please.

Thanks in advance

Annmol

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

Try something like this:


qq.jpg



ww.jpgss.jpg


View solution in original post

8 REPLIES 8

mamann
Mega Guru

Hi Annmol,



Can you elaborate on why you need a DB View for two tables that have a reference to the other?


Problem Task reference's Problem, so you should be able to get all of the data from reporting on the Problem Task table.


hi Mark




Thanks for your reply.


My requirement is to pull Problem records which hasn't got any task associated with it. So can't use Problem task table for this. Have to get to problem table and see if any related tasks are there and for that I   can't find any reference. Hope its clear.



Thanks


Annmol


Michael Fry1
Kilo Patron

Try something like this:


qq.jpg



ww.jpgss.jpg


Hi Micheal



Thanks for that.. This started giving me problems and associated tasks, however as I mentioned above, I need all problem records irrespective of whether it has a task or not. I tried wth the left joins and not without joins. might need a null condition as well. will give it a try.



I still don't understand this where clause condition..! when I check Task form Problem field holds problem number, then how can we compare it to sys id of problem!


Thanks


Annmol