Following Select is dangerous.
Selecting from two tables but no join between them so it will yield cartesan product. if this is what you want just ignore my comment.
Second, * wil lget all fields from both tables if a column appears in both it will generate error too.
I first start with the following statement and write clearly with join condition and
SQL SELECT *
I need the all of the records from both HUM.TFNDPBH and HUM.TFNDPCK otherwise I would have used a join. I was advised use ApplyMap because the Map Auditor table is just to give regions, names and UserIDs for the checks in the two above mentioned tables. Would it be better to separate those two and then do applymap() to the two separate tables?
Please check the comparison and desired value.
When using “applyMapp”, we need to understand that the mapping table consists of two columns, the first containing comparison values and the second containing the desired mapping values (see qlikview manual).
For example in your case
SQL SELECT "AUDNAME", "AUDUID"
Here the Comparison value is = AUDNAME and the desired value is = AUDUID.
So in your script you will have
ApplyMap('Region', MGR) as Region,
ApplyMap('PosterName', AUDUID) as UserName;
As stated by ebolluca the error is in your SQL statement and is not an error in the QlikView mapping function.
You need to specify the join between the two tables in your select statement, or load each SQL table separately into QlikView, and sort out the field names to get the correct association between the tables.
Here's the code. Took out one table for right now. Got the Field not Found error. Added the fields in. Got this error: "AUDUID" is not valid in the context where it is used" when I added AUDUID, REG, and AUDNAME. If I take it out, I get the Field Not Found error, which pretty much sends me back to my original question.
SQL SELECT "SUPID",
//***Region Name table***//
SQL SELECT "MGR",
//***Poster Name table***//
SQL SELECT "SUP",
//***Deposit Summary with Region and User Info***//
if(Age <=7,'0 - 7',
if(Age >7 and Age <=14,'8 - 14',
if(Age >14 and Age <=21,'15 - 21',
if(Age >21 and Age <=28,'22 - 28',
if(Age >28 and Age <=35,'29 - 35',
if(Age >35 and Age <=42,'36 - 42',
if(Age >42 and Age <=49,'43 - 49',
if(Age >49 and Age <=56,'50 - 56',
if(Age >=57,'57+'))))))))) as AgeCat;
LOAD "CHECK_SOURCE" as CheckSrc,
"DEPOSIT_DATE" as DepositDate,
"NUMBER_CHECKS" as NumberChecks,
"VALIDATOR_ID" as ValidatorID,
Interval(Today()-DEPOSIT_DATE,'DD') as Age,
ApplyMap('Region',REG) as Region,
ApplyMap('PosterName',AUDNAME) as UserName;
SQL SELECT "CHECK_SOURCE",