Reporting from Union Queries

johnfeist
Mega Sage
Mega Sage

I see a lot of posts on this topic, but they all seem to be at least two years old and obsolete.  What I'm trying to do is a simple union query of two tables, incident and problem so that I can generate some reports form the combined set.  Unfortunately, at least one column, state, has table specific values so I can't just report both out of task.

Is it possible to define a database view, or similar to do a union?  If so, how?

Thank you for any ideas, suggestions, etc.

John

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster
1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

You can't do this with all tables, but you can make it work with tables that extend the same parent.  Check out example 4 in this post to see how to create a database view to accomplish this...

https://community.servicenow.com/community?id=community_blog&sys_id=5b0d2ea5dbd0dbc01dcaf3231f961946

I've got this set up in my system and it works great.

View solution in original post

5 REPLIES 5

@Mark Stanger  - This looks like it's exactly the solution I need but the link doesn't work any more. Can you provide an updated link? Thanks very much!