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?
Comments
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.ComputerIDThe 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.