Jump to content

Report on all calls and JOIN on h_sys_contacts


chriscorcoran

Recommended Posts

Some more info. The report works fine and pull back over 15000 if I remove the join to the h_sys_contact table. The issue is I need the column company name which is found in his table, so if I add it back it ignores all internal calls that are logged, I'm guessing because internals don't have a company ID?

Link to comment
Share on other sites

Hi Chris,

 thanks for your post.

I believe the issue here is the type of JOIN you are using. A standard JOIN will only return records when there is a corresponding record in both tables. You should change your report to use a LEFT JOIN. A LEFT JOIN will return all records in the left table (h_itsm_requests) and the matching records in the right table (h_sys_contact).

The reason why some request records will not show a company name is indeed because the customer of these requests will be Basic users whos details are held in h_sys_accounts.

I hope that helps,
Dan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...