I'm a new QlikSense developer and I have an issue I've been trying to tackle.

I have a fully deployed application connected to SQLServer (I don't know what version, and it isn't confirmed... this is a legacy server that the project team hasn't worked with - mostly positive it is coming from SQL Server connection).

My issue is on a join in the data load editor between 3 different tables with 3 different alias indicators. All field names have changed from lower case in SQLServer to UpperCase in the HANA connection, so all have been changed (besides those fields already being given new alias for business logic).

Here is the code:

LIB CONNECT TO 'DRIA';

SQL SELECT distinct kg.ID as 'keyID', 'X' as 'mostRecent'

INTO #T1

FROM "_SYS_BIC"."VW_KEYS_GENERATED" pmA OUTER APPLY

(select top 1 kg.ID from VW_KEYS_GENERATED kg

left outer join VW_OPTIONS_USED ou

on kg.ID = ou.KEYID

where pmA.SERIALNO = kg.SERIALNO

and ou.CHARACTERISTIC = 'PROTECTION'

and ou.VALUE = 'TRUE'

order by kg.DATETIME desc) kg ;

SELECT ou.[ID]

,ou.[KEYID]

,[TYPE]

,[CATEGORY]

,[CHARACTERISTIC]

,kg.SERIALNO

,ouY.VALUE as 'PMTypeActual',

case CHARACTERISTIC when '' then CATEGORY + ' - ' +

case ou.VALUE when '' then 'Not Installed'

else ou.[VALUE] end

else CATEGORY + '-' + CHARACTERISTIC + ' - ' +

case ou.VALUE when '' then 'Not Installed'

else ou.[VALUE] end

end as 'indCategory'

,case ou.VALUE when '' then 'Not Installed' else ou.[VALUE] end as 'value'