SQL query report

SQL query report

hey guys can some one please change this query to something that service desk report can read and execute ???

SELECT "wo"."WORKORDERID" AS "id", 
       "wof"."UDF_CHAR5" AS "APP_key"
FROM "WorkOrder" "wo"
LEFT JOIN "WorkOrderStates" "wos" ON "wo"."WORKORDERID"="wos"."WORKORDERID"
LEFT JOIN "RequestTemplate_List" "rtl" ON "wo"."TEMPLATEID"="rtl"."TEMPLATEID"
LEFT JOIN "StatusDefinition" "std" ON "wos"."STATUSID"="std"."STATUSID"
LEFT JOIN "WorkOrder_Fields" "wof" ON "wo"."WORKORDERID"="wof"."WORKORDERID"
WHERE ( ( "wof"."UDF_CHAR5" IS NOT NULL ) 
        AND ( ( ( ( "std"."STATUSNAME" != N'solved' ) 
        AND ( "std"."STATUSNAME" != N'ended' ) ) 
        AND ( "std"."STATUSNAME" != N'denied' ) ) 
        OR ( "std"."STATUSNAME" IS NULL ) ) )  
AND wo.ISPARENT='1' 
AND ( ( "rtl"."TEMPLATENAME" != N'acc-001' ) 
    OR ( "rtl"."TEMPLATENAME" IS NULL ))
ORDER BY "wo"."WORKORDERID"
OFFSET 0 ROWS FETCH NEXT 1000 ROWS ONLY


It works fine in SQL server management studio but I'm having problem making SDP understand the red part.

                New to ADSelfService Plus?