Microsoft
Software
Hardware
Network
Question : Excel SQL Subtotal
I am using Excel to connect to an MSSQL database. Specifically, I am using the Excel function: Data / Import External Data / New Database Query.
I am able to successfully get the information I want, but I would like to know how to subtotal by category. So in my case, my query generates the following SQL statement:
SELECT Patient."Last Name", Patient."First Name", Patient."Last Visit", Patient."Provider Code", Patient."Facility Code"
FROM "Sample Company".dbo.Patient Patient
ORDER BY Patient."Facility Code", Patient."Provider Code", Patient."Last Name"
This gives me a nice long spreadsheet sorted by Facility. Is there a way to subtotal the Count of each unique value in the Facility column?
Answer : Excel SQL Subtotal
Once you get back the query results, then, you can use Excel's subtotals feature.
In Excel 2003 it was under either Insert or Data (can't check now); in Excel 2007 it's on the Data tab, Outline group.
Random Solutions
How can enable "automatic hyperlink" option in Outlook 2007? I checked "Internet and network paths with hyperlinks" and the option is selected.
expect: timeout for pattern action block only?
Adding second processor to existing win 2008 server
Network printer IP connection drops but only for one user
Joining 3 tables
USB port identificaion
Access Denied with Process.start when reading a text file.
Write a batch file in windows and schedule it to copy certain files to Linux server?
Referring to Data in a Drop Down List that is selected
music and effects on plants