Discussion Board for collaboration on QlikView Scripting.
My script looks like this:
FROM [..\..\QVD\MyTable.qvd] (qvd);
Trim([ASAR Removal Type]) As [Removal Type],
Trim([ASAR Event Trigger]) As [ASAR Trigger],
Trim([Removed Roles]) As [ASAR Roles],
Trim([Removed Entitlements]) As [ASAR Entitlements],
SubStringCount([ASAR Roles],'chr(10)') As roleCount1,
SubStringCount([ASAR Entitlements],'chr(10)') As EntCount1
Whenever I run the script , it says it cant find [ASAR Roles]. Is it because I cant rename a field in the same table?
Yes you cannot rename the field in same load and use that renamed field in the same load. So try like resident load as below:
SubStringCount([ASAR Entitlements],'chr(10)') As EntCount1;
Trim([Removed Entitlements]) As [ASAR Entitlements]
View solution in original post
You can rename field in same table but you cannot use renamed field in same load.
So as suggested you can use preceding load or resident load, or use original field name in new calculation
1: Preceding load
2: Using Resident Load
3: Using same field in calculation
SubStringCount(Trim([Removed Roles]),'chr(10)') As roleCount1,
SubStringCount(Trim([Removed Entitlements]),'chr(10)') As EntCount1
It's because the field [ASAR Roles] doesn't exist in table [SPT_AUDIT_EVENT]. In other words, you are trying to LOAD [ASAR Roles] from [SPT_AUDIT_EVENT].
Thanks . This makes sense.
Thank you .