SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SUMIF Formula
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

atuljadhavnetafim
Starting Member

India
11 Posts

Posted - 10/30/2013 :  01:05:55  Show Profile  Reply with Quote
Dear Sir

i am using SUMIF formula in excel, i have very big data in one sheet and in second sheet i have format which give me sum of value with sigle condition, e.g. my table having Date wise sales of all states, so i get particular States total sales from sumif formula, but when i send this file to my managers it is very big and it takes time to open from server also,

so i want once solution, if i salve my raw data file to sql server as table, and save excel file in my local drive and use sumif formula which will give me sum of that particular states sale from my sql table,

is it possible ?

i have tried to make pivot from sql server table it is work fine but it is possible to get result by using sumif formula ?

this is my first post and expective good responce
thanks in advance

Atul Jadhav

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 10/30/2013 :  01:26:51  Show Profile  Reply with Quote
you can use CASE WHEN in SQL Server to get SUMIF functionality

ie something like

SUM(CASE WHEN <your criteria> THEN <your field> ELSE 0 END)


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22744 Posts

Posted - 10/30/2013 :  05:31:03  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
<<
i have tried to make pivot from sql server table it is work fine but it is possible to get result by using sumif formula ?
>>

What is wrong with using it?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000