Posted on: 4/9/2015 1:49:35 PM | Views : 581

I got an inventory table, so I am trying to pull out and calculate values from the table and display them in a gridview.
I'm trying to make a MySQL query with Union so the columns would display Department, Not Refreshed, Completed.
With the query I have below I only get department and not refreshed I do not get the Completed column.
Any ideas?
Dim GetDataCMD As New MySqlCommand("(SELECT department As Department, COUNT(RefreshCycle) As 'Not Refreshed' FROM tbldesk_inv WHERE (RefreshStatus!=@RefreshStatus) AND " & _ "(asset_type='Desktop' OR asset_type='Laptop' OR asset_type='Ultraportable' OR asset_type='Revolve' OR asset_type='Workstation' OR asset_type='Mobile Workstation' OR asset_type='Tablet') GROUP BY department) " & _ "UNION " & _ "( ...

Go to the complete details ...