Query Report keeps giving errors

Query Report keeps giving errors

Dear MSP,

I'm having some issues with making my custom query.
I only wanted to add the requester and the resolution, though I keep getting errors, while only adding the requester.

So here's my code:

SELECT wo.WORKORDERID "Request ID",wo.title"Subject",aau.FIRST_NAME "Requester",wof.UDF_LONG1 "Time spent (m)",longtodate(wo.CREATEDTIME) "Created Time",longtodate(wo.COMPLETEDTIME) "Completed Time",acd.ORG_NAME "Account",aci.fax"KLANT NUMMER" FROM WorkOrder wo LEFT JOIN WorkOrderToDescription wotodesc ON wo.WORKORDERID=wotodesc.WORKORDERID LEFT JOIN SiteDefinition siteDef ON wo.SITEID=siteDef.SITEID LEFT JOIN WorkOrder_Fields wof ON wo.WORKORDERID=wof.WORKORDERID
left join accountsitemapping asp on siteDef.siteid=asp.siteid
left join accountdefinition acd on acd.org_id=asp.accountid
LEFT JOIN SDOrganization sdo ON asp.accountid=sdo.ORG_ID
left join sdorgcontactinfo sdoc on sdoc.org_id=sdo.ORG_ID
left join aaacontactinfo aci on aci.CONTACTINFO_ID=sdoc.CONTACTINFO_ID
WHERE  wo.ISPARENT='1'
and wo.COMPLETEDTIME >= <from_lastweek> AND wo.COMPLETEDTIME<= <to_lastweek>
and wof.UDF_LONG1 > 1

And here's my error:
java.sql.SQLException: The multi-part identifier "aau.FIRST_NAME" could not be bound.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
    at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:933)
    at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorCreate(MSCursorResultSet.java:541)
    at net.sourceforge.jtds.jdbc.MSCursorResultSet.<init>(MSCursorResultSet.java:154)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:365)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1258)
    at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:250)
    at com.adventnet.servicedesk.reports.utils.CoreReportDesigner.generateSQLReport(CoreReportDesigner.java:7623)
    at com.adventnet.servicedesk.reports.action.ReportRequestHandler.runSQLQueryReport(ReportRequestHandler.java:1606)
    at com.adventnet.servicedesk.reports.action.ReportRequestHandler.handleRequest(ReportRequestHandler.java:1921)
    at com.adventnet.servicedesk.reports.action.CustomReportHandler.handleRequest(CustomReportHandler.java:187)
    at com.adventnet.servicedesk.reports.action.ReportHandler.execute(ReportHandler.java:59)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at com.adventnet.servicedesk.filter.AccountUrlFilter.doFilter(AccountUrlFilter.java:55)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at com.adventnet.servicedesk.filter.EncodingFilter.doFilter(EncodingFilter.java:116)

Where and how can I add the requester (I want it right after subject)? And the resolution right after the requester?

I'm in kind of a hurry, so help would really helpfull right now.

FYI: I have Servicedesk plus MSP:
Version 8.1 build 8104

Thanks in advantage,

Deborah



























































                  New to ADSelfService Plus?