Articles

External Article

Importing Data From Excel Using SSIS - Part 1

Recently while working on a project to import data from an Excel worksheet using SSIS, I realized that sometimes the SSIS Package failed even though when there were no changes in the structure/schema of the Excel worksheet. I investigated it and I noticed that the SSIS Package succeeded for some set of files, but for others it failed. I found that the structure/schema of the worksheet from both these sets of Excel files were the same, the data was the only difference. How come just changing the data can make an SSIS Package fail? What actually causes this failure? What can we do to fix it?

2012-10-08

3,887 reads

External Article

Matrix Math in SQL

Relational Datbases have tables as data structures, not arrays. This makes it tricky and slow to do matrix operations, but it doesn't mean it is impossible to do. Joe gives the Celko Slant on how to go about doing Matrix Math in SQL.

2012-10-04

3,741 reads

Technical Article

Protecting the SQL Server Backup folder

I want to backup my SQL Server databases to a folder, but I want to minimize who has access to the folder. In other words, I want to make sure that members of the Windows Local Administrators group don't get to the backups without intentionally trying to bypass the security. How do I do that?

You rated this post out of 5. Change rating

2012-10-02

3,264 reads

Blogs

Automatic Index Compaction

By

Index maintenance has always meant nightly jobs and a window you have to defend....

The Goldilocks problem – Materialized Views

By

I’m sure you’ve all heard the tale of Goldilocks and the Three Bears, but...

Monday Monitor Tips: Virtual Machine Usage and Cost

By

One of the things I’ve been requesting for a number of years is cost...

Read the latest Blogs

Forums

SQL Art, Part 4: Happy 4th of July — A British DBA's Guide to Celebrating a War We Don't Talk About

By Terry Jago

Comments posted to this topic are about the item SQL Art, Part 4: Happy...

SQL Server Still Wins

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SQL Server Still Wins

DBCC CHECKDB Limits I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item DBCC CHECKDB Limits I

Visit the forum

Question of the Day

Getting the Average

I have this data in the dbo.Commission table in a SQL Server 2022 database.

salesperson commission
Brian       12
Brian       16
Andy        7
Andy        14
Andy        21
Steve       20
Steve       NULL
All the data is a varchar, and I decide to run this query to get the totals for each salesperson.
SELECT SalesPerson
     , AVG(TRY_PARSE(Commission AS int)) AS TotalCommission
 FROM commission
 GROUP BY SalesPerson
GO
What average commission is calculated for Steve?

See possible answers