February 4, 2012 at 12:21 am
Hi all,
My source is excel, I have to load the data from source to target
As per the below structure
first column in target---sum all qty in table, second column--totsales_pric in table
third & fourth column in target are
Sum of qty for tv and sum of tot_sales for tv
Source:
Zone, Prod_name ,qty, sales_price
North Tv 30 15000
south Laptop 12 20000
North Tv 20 10000
Target:
Count_qty , total_price, Tv_qty, Tv_totsal
62 45000 50 25000
February 4, 2012 at 3:03 am
Hi,
write script Query for the above.
I hope you need
1st column to go table1
2nd column to go table2
for 3rd n 4th use sum(3,4) function
February 4, 2012 at 4:24 am
There is an aggregate component which should work for you. Alternatively you should look at a staging table which you can use to summarise the data.
February 6, 2012 at 5:27 am
I don't believe this is possible. It seems like when RS exports the data, it does data only... and sometimes does some interesting things with column spanning cells too. It may be possible to do something clever where the "value" in the reporting services report is the expression you want Excel to evaluate when it's exported, but my guess is that RS would escape the function and you still wouldn't have what you wanted (besides that, the RS report would look funny then). For our reports, I usually export them to Excel, clean them (a little), then put the functions I want in. Once I had it the way I wanted, I used the new Excel file as a template with the formulas at the top and just cut-n-paste the data out of the new exports into the clean sheet. (yes, I should automate it, but it doesn't need to be done very often)
I know this doesn't help, but at least you know someone looked at your post (better than zero replies?
http://www.sqlservercentral.com/Forums/Topic449610-150-1.aspx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply