Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

SQL query crashing

If I run this query in PDQ Inventory report, it consistently crashes with "It appears you have uncovered a bug in PDQ Inventory":

select Applications.Name , Computers.Name from Computers left join Applications on Applications.ComputerId=Computers.ComputerID

This works ok:

select Applications.Name from Computers left join Applications on Applications.ComputerId=Computers.ComputerID

And this works ok:

select Computers.Name from Computers left join Applications on Applications.ComputerId=Computers.ComputerID

And this works ok:

select Applications.Version , Computers.Name from Computers left join Applications on Applications.ComputerId=Computers.ComputerID

Why? What can I do to make it work?

0

Comments

1 comment
Date Votes
  • The answer was to rename one of the columns called Name. Eg. select Applications.Name as App , Computers.Name from Computers left join Applications on Applications.ComputerId=Computers.ComputerID

    The message that was coming up was offering to submit a bug report, but if I looked closer, in among the diagnostic information it says "Error : A column named 'Name' already belongs to this DataTable."

    Strange way to offer diagnostic information.

    0