Please use alias for UserAdditionalFields table Check logs for details.

Please use alias for UserAdditionalFields table Check logs for details.

I have a problem after upgrading to the latest version.
I have a query that works perfectly from pgsql but in servicedesk it fails me.
Can you help me ??

Please use alias for UserAdditionalFields table
Check logs for details.

SELECT 
to_char(to_timestamp((wo.CREATEDTIME)/1000), 'dd-mm-yy ') as "FechaCreacion",
to_char(to_timestamp((wo.CREATEDTIME)/1000), 'yy') as "Año" ,
to_char(to_timestamp((wo.CREATEDTIME)/1000), 'mm ') as "Mes" ,
to_char(to_timestamp((wo.CREATEDTIME)/1000), 'dd') as "Dia" ,
DATE_PART('week',to_timestamp((wo.CREATEDTIME)/1000))::integer as "Semana" ,
to_char(to_timestamp((wo.CREATEDTIME)/1000), 'HH24:MI') as "Hora de creación" ,

wo.WORKORDERID AS "ID de la solicitud", 
sdo.NAME AS "Multimedia",
 userAddFds.UDF_CHAR6 AS "User_Empresa (DA)", 
dpt.DEPTNAME AS "Departamento", 
aau.FIRST_NAME AS "Solicitante",
AddFds.UDF_CHAR4 AS "Usuario VIP",
 wof.UDF_CHAR1 AS "Tipo", 
pd.PRIORITYNAME AS "Prioridad", 
std.STATUSNAME AS "Estado de solicitud", 
cd.CATEGORYNAME AS "Categoría",
 scd.NAME AS "Subcategoría", 
icd.NAME AS "Artículo",
 wo.TITLE AS "Asunto", 
wotodesc.FULLDESCRIPTION AS "Descripción", 
rrs.RESOLUTION AS "Resolución", 
wo.COMPLETEDTIME AS "Hora de resolución", 
qd.QUEUENAME AS "Grupo", 
ti.FIRST_NAME AS "Técnico", 
wof.UDF_CHAR5 AS "3ªParte", 
wof.UDF_CHAR19 AS "Proveedor", 
wof.UDF_CHAR13 AS "Ticket proveedor",
impdef.NAME AS "Impacto", 
urgdef.NAME AS "Urgencia" 
FROM WorkOrder wo 
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID 
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN UserAdditionalFields userAddFds ON sdu.USERID=userAddFds.INSTANCE_ID

LEFT JOIN DepartmentDefinition dpt ON wo.DEPTID=dpt.DEPTID 
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID 
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID 
LEFT JOIN PriorityDefinition pd ON wos.PRIORITYID=pd.PRIORITYID
LEFT JOIN SubCategoryDefinition scd ON wos.SUBCATEGORYID=scd.SUBCATEGORYID 
LEFT JOIN ItemDefinition icd ON wos.ITEMID=icd.ITEMID
LEFT JOIN UrgencyDefinition urgdef ON wos.URGENCYID=urgdef.URGENCYID
LEFT JOIN ImpactDefinition impdef ON wos.IMPACTID=impdef.IMPACTID 
LEFT JOIN RequestResolver rrr ON wo.WORKORDERID=rrr.REQUESTID 
LEFT JOIN RequestResolution rrs ON  ( ( rrr.REQUESTID = rrs.REQUESTID ) AND ( ( rrs.REQUESTID >= 1 ) AND ( rrs.REQUESTID <= 200000000 ) ) ) 
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID 
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
LEFT JOIN WorkOrderToDescription wotodesc ON wo.WORKORDERID=wotodesc.WORKORDERID
LEFT JOIN SiteDefinition siteDef ON wo.SITEID=siteDef.SITEID 
LEFT JOIN SDOrganization sdo ON siteDef.SITEID=sdo.ORG_ID
LEFT JOIN WorkOrder_Fields wof ON wo.WORKORDERID=wof.WORKORDERID 
WHERE (wo.ISPARENT='1')

                New to ADSelfService Plus?