I am trying to see how to do a post operation based on the scenario below. I don't care if its a post operation or not but I need to bring in a rate and an exemption type.
I have a transactional file with four fields in question for the sake of discussion: Property, Sales Month, Tax Rate, Exemption Type
The sales month uses a six character representation of the year and month, ie YYYYMM.
Call this Table1, record 1 initially has these values for the first record.
Property Sales Month Tax Rate Exempt Type
Property1 201601
I need to pull in the tax rate and the exempt type out of Table2 by first matching the value from Property in each table, and by looking up the tax rate and exempt type in table 2 from each of the effective months below. So the correct answer is to match up 201601 as being greater than 201509 but less than 201602, so the Tax Rate should be .035 and the Exempt Type should be 11 in this case.
In another table (call it Table2), I have records similar to below:
Property, Eff Month, Tax Rate, Exemption Type
The Eff Month has the same 6 digit character set for year and month, also YYYYMM.
So, table2 could have records like this.
Property Eff Month Tax Rate Exempt Type
Property1 201412 0.075 Null
Property1 201505 0.053 5
Property1 201509 0.035 11
Property1 201602 0.053 5
Thanks for your help....
Bruce
I have a transactional file with four fields in question for the sake of discussion: Property, Sales Month, Tax Rate, Exemption Type
The sales month uses a six character representation of the year and month, ie YYYYMM.
Call this Table1, record 1 initially has these values for the first record.
Property Sales Month Tax Rate Exempt Type
Property1 201601
I need to pull in the tax rate and the exempt type out of Table2 by first matching the value from Property in each table, and by looking up the tax rate and exempt type in table 2 from each of the effective months below. So the correct answer is to match up 201601 as being greater than 201509 but less than 201602, so the Tax Rate should be .035 and the Exempt Type should be 11 in this case.
In another table (call it Table2), I have records similar to below:
Property, Eff Month, Tax Rate, Exemption Type
The Eff Month has the same 6 digit character set for year and month, also YYYYMM.
So, table2 could have records like this.
Property Eff Month Tax Rate Exempt Type
Property1 201412 0.075 Null
Property1 201505 0.053 5
Property1 201509 0.035 11
Property1 201602 0.053 5
Thanks for your help....
Bruce
Comment