I need help in following.
I have not tried anything because I have applied a naive approach, hardcoding elements. However as pivots are increasing in numbers I have to provide support on every change, I would like to change code so that changes will be dynamically supported without my intervention. To me this is a complex query and I have absolutely no idea how to go about it. I would need to make variations once I get to understand the concept. I have (among others) 2 tables:
This is detail table of a master table:
What I have to do is calculate:
following value taxamount = it will be
for all the records in taxtype so that I have a crosstab report having following columns:
I need help in building query - could be stored proc or views . A template query will do and I can adapt it for my purposes. Even an example done earlier will do - I will try and understand it. Thanks in advance