I have the below data and format of the expected results. I don't know the right expression to use to pull the expected results. Basically, I am just trying to get the full name linked to the usernames for the end users. May be ONLY function might be the solution but I am not getting how to write the expression. I get the expected results by twisting the sql script by adding multiple joins but I am sure QlikView has an easier expression to do this.
SELECT TableA.AccountID, TableB.Name FROM TableA LEFT JOIN TableB ON TableA. AttendingID =TableB. ProviderID AND TableA. AdmittingID =TableB.ProviderID
Expected Result - What expressions should I use to get the below result???
What you have done is divided TableA into Attending and Admitting tables and that is exactly what I meant by "I get the expected results by twisting the sql script by adding multiple joins". I am using straightbox so I was wondering if we can add some kind of expression that can solve this in a simpler way than doing much of coding in the script itself.
Expression to pick Name based on AttendingID and expression to pick Name based on AdmittingID.