Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Manipulating Results before exporting.

Author  Topic 

Oskoss
Starting Member

1 Post

Posted - 2012-06-11 : 09:44:46
As the title states, I have a table that has multiple columns. A few of the columns I want to just export what is in each (which I can do), but I want to know if there is a way to use the sql functions such as SUM and COUNT on a column and then export the results. How would I go about doing that?

Thanks for any help!

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-06-11 : 10:20:08
Then the source of your export has to be a SELECT statement or a VIEW with the needed result set.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-06-11 : 15:18:09
quote:
Originally posted by Oskoss

As the title states, I have a table that has multiple columns. A few of the columns I want to just export what is in each (which I can do), but I want to know if there is a way to use the sql functions such as SUM and COUNT on a column and then export the results. How would I go about doing that?

Thanks for any help!


you can either use sql statement with GROUP BY and SUM,COUNT as your source or you can bring data from table and do aggregation during export using ssis packages. I would prefer first method as its best to do it before export itself if you're sure you want only aggregated data.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

wendyss
Starting Member

4 Posts

Posted - 2012-06-11 : 22:16:36
I would prefer first method as its best to do it before export itself if you're sure you want only aggregated data.


----------------------------------------------------------------------------------------------------------------------------------------
[url=http://www.rchelicopterus.com/]Rc Helicopter Parts[/url]|[url=http://minirchelicopter-reviews.com/]Mini Rc Helicopter[/url]|[url=http://rc-helicopters-reviews.com/]Rc Helicopters Reviews[/url]|[url=http://www.rchobbyforsale.com/]Rc Hobby[/url]

liuli wendys
Go to Top of Page
   

- Advertisement -