Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a main table (part 😎 that is joining to another table (part3) only where the id is IN part 8.
I switched over to mapping tables in the script, and I want to apply the field a in part 8, but it is only created in the following left join, and it is not finding the table.
I have part 8 bringing in all of my fields including 1 and 2, the left join below is because in this instance only (there are 8 parts but this only happens when we are at part 😎 we want part 3 fields to be brought in only when the id is in part 8. When there is a natural join, part 3 brings in all fields but we need the specific population.
Hope this makes sense! Thanks!
Part8:
LOAD ..... FROM
LEFT JOIN(Part8)
LOAD
[id],
[id2],
[id3],
sum([1]) as [field a]
sum([2]) as [field b]
resident [Part 3]
group by [Cedent/ Reinsurer],[Cedent Institution Name],[Cedent NAIC Company Code];
--------------------------------
[ML_Part3_Join_Funds]:
Mapping Load
[Cedent/ Reinsurer],
SUM([Part3_Join_field a]) as [field a]
Resident [Part 3]
Group by [ID];
Hi Laila, I'm not sure if you're looking for something like this:
MappingField_a:
Mapping LOAD
[id],
sum([1]) // as [field a]
resident [Part 3]
group by [id];
MappingField_b:
Mapping LOAD
[id],
sum([2]) // as [field b]
resident [Part 3]
group by [id];
Table1:
LOAD Id
Name
Phone
YesorNo
If(YesorNo='YES', Applymap ('MappingField_a',Id,'N/A') as [Part 3_field a]
If(YesorNo='YES', Applymap ('MappingField_b',Id,'N/A') as [Part 3_field b]
From...
I have no idea what you are trying to do. Do you possibly share your application?
please try to explain with sample data and expected result.
Table1:
Id
Name
Phone
YesorNo
Applymap ('MappingTable1',[YesorNo],'N/A') as [Table1Id], WHERE YesorNo=YES
From...
You need to load you mapping table first than you need to call the table later..
I guess you have not loaded the mapping table first ..so that's causing the issue.
Load you mapping table first and then check
No I loaded my mapping table, I just want to know the "Where" Syntax...Is that right? It doesn't seem to be working.
Hi Laila, I'm not sure if you're looking for something like this:
MappingField_a:
Mapping LOAD
[id],
sum([1]) // as [field a]
resident [Part 3]
group by [id];
MappingField_b:
Mapping LOAD
[id],
sum([2]) // as [field b]
resident [Part 3]
group by [id];
Table1:
LOAD Id
Name
Phone
YesorNo
If(YesorNo='YES', Applymap ('MappingField_a',Id,'N/A') as [Part 3_field a]
If(YesorNo='YES', Applymap ('MappingField_b',Id,'N/A') as [Part 3_field b]
From...
try link this
Table1:
LOAD Id,
Name,
Phone,
YesorNo,
Applymap ('MappingTable1',[YesorNo],'N/A') as [Table1Id]
WHERE YesorNo='YES'
From...