Hi,
----------------------
SDPAdmins.pl - Piszemy o SDP i nie tylko.
https://www.facebook.com/SDPAdminspl-128393794236437/ - Like us on Facebook :)
This is probably because of that the report wizard adds the aggregate function MAX() in the SELECT of a query. If you have a possibility to check the query that is executing then you would see that function in every column.
- SELECT MAX("workstation"."WORKSTATIONNAME") AS "Machine Name", MAX("product"."COMPONENTNAME") AS "Product", MAX(compDefLaptop.ISLAPTOP) AS "Is Laptop", MAX("workstation"."LOGGEDUSER") AS "Last Logged In User", MAX("aaaUser"."FIRST_NAME") AS "User"
I don't remember which update fixed this issue and changes the SELECT to
- SELECT MAX("workstation"."WORKSTATIONNAME") AS "Machine Name", MAX("workstation"."LOGGEDUSER") AS "Last Logged In User", MAX("product"."COMPONENTNAME") AS "Product", MAX("aaaUser"."FIRST_NAME") AS "User", MAX(CASE WHEN CAST(compDefLaptop.ISLAPTOP AS CHAR(5)) IS NULL THEN 0 WHEN CAST(compDefLaptop.ISLAPTOP AS CHAR(5)) = '0' THEN 0 ELSE 1 END) AS "Is Laptop" FROM "SystemInfo" "workstation"
When I've got this error and analyzed it, I modified the query and it worked like a charm :)
- SELECT "workstation"."WORKSTATIONNAME" AS "Machine Name", "product"."COMPONENTNAME" AS "Product", compDefLaptop.ISLAPTOP AS "Is Laptop", "workstation"."LOGGEDUSER" AS "Last Logged In User", "aaaUser"."FIRST_NAME" AS "User" FROM "SystemInfo" "workstation"
- LEFT JOIN "Resources" "resource" ON "workstation"."WORKSTATIONID"="resource"."RESOURCEID"
- LEFT JOIN "ComponentDefinition" "product" ON "resource"."COMPONENTID"="product"."COMPONENTID"
- LEFT JOIN "ComponentDefinitionLaptop" "compDefLaptop" ON "product"."COMPONENTID"="compDefLaptop"."COMPONENTID"
- LEFT JOIN "ResourceOwner" "rOwner" ON "resource"."RESOURCEID"="rOwner"."RESOURCEID"
- LEFT JOIN "ResourceAssociation" "rToAsset" ON "rOwner"."RESOURCEOWNERID"="rToAsset"."RESOURCEOWNERID"
- LEFT JOIN "SDUser" "sdUser" ON "rOwner"."USERID"="sdUser"."USERID"
- LEFT JOIN "AaaUser" "aaaUser" ON "sdUser"."USERID"="aaaUser"."USER_ID"
- WHERE (ISSERVER='0')
----------------------
SDPAdmins.pl - Piszemy o SDP i nie tylko.
https://www.facebook.com/SDPAdminspl-128393794236437/ - Like us on Facebook :)