LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Import Wizard – Microsoft.ACE.OLEDB 12.0 provider is not registered

I use SSMS and the Import Data Wizard quite a bit. Quickly importing data is a fairly common and anoften task that we all have to perform. The wizard simply makes it more efficient given less time to perform the task. Most of this data is, like mentioned, quick imports of data that will be used and dropped shortly after it has been used. I’ve been running on Windows 8 Pro for some time now.

Read More...

Creating statistics manually – Duplicate Statistics

Something I never really would have thought much about was the creation of statistics does as it impacts an index creation – mostly, the naming convention. In some situations, there may be a need to create your own statistics. Now, 99.999% of the time you will likely be indexing and creating statistics in a much different form than what I’m about to show but nonetheless, it happened to me today so I’m going to show it so others can avoid it.

Read More...

Indexes in MongoDB: A quick overview

This is my fourth MongoDB post, in the first post we looked at how we can install MongoDB as a Windows Service, In the second post we looked at how we could do UPSERTs with MongoDB, In the third post we looked at how to sort results in MongoDB. This post is about indexing in MongoDB, we are going to take a look at how to create indexes and how to see if the indexes are being used by MongoDB.

Read More...

Displaying missing dates by utilizing a calendar table

We got a question today from a user who wanted to display counts of zero where dates were missing. For example if you had the following data OrderDate SomeCount 2013-01-01 2 2013-01-02 2 2013-01-03 1 2013-01-05 2 2013-01-07 1 2013-01-08 1 2013-01-09 2 What you really wanted is the following OrderDate SomeCount 2013-01-01 2 2013-01-02 2 2013-01-03 1 2013-01-04 0 2013-01-05 2 2013-01-06 0 2013-01-07 1 2013-01-08 1 2013-01-09 2 As you can see we added January 4th and January 6th to the results with a count of zero.

Read More...

Does anyone use the NTILE() windowing function?

A question was asked on StackOverflow about how NTILE() works: Want to learn more on NTILE() I answered that question and then started thinking about NTILE(), I realized that I have never used this function in production code. Everytime I used it was for demoware purposes. I did a quick check against a bunch of databases SELECT * FROM sys.sql_modules WHERE OBJECT_DEFINITION(object_id) LIKE '%ntile%' ——- (0 row(s) affected) Doesn’t exist.

Read More...

MongoDB, how to sort results

This is my third MongoDB post, in the first post we look at how we can install MongoDB as a Windows Service, In the second post we looked at how we could do UPSERTs with MongoDB, today we will look at how to sort results in MongoDB Connect to MongoDB and insert the following data db.SortTest.insert( { name : "Denis", age : 20 } ) db.SortTest.insert( { name : "Abe", age : 30 } ) db.

Read More...

What is going on with Database Mail in SQL Server

Two days ago I wrote a post Setting up SQL Server Database Mail with gmail, I showed you how to setup SQL Server Database Mail to work with a gmail account. In yesterday’s post Database Mail maintenance in SQL Server we looked at some maintenance, today we are going to look at how we can check what is being done by Database Mail. There are a couple of Catalog Views that we will take a look at:

Read More...

Displaying .Net Build Warnings in TeamCity

I like it when I kick off a build and there aren’t any warnings. Unfortunately I’m forgetful and it’s always easier to edit the code now then it is 3 months later (when I remember to look at the warnings). When I put together my sample Continuous Delivery project, I was using Jenkins, which provided plugins for capturing warnings. It was nice to have visual feedback when I added a new warning, see how many were outstanding, have a list of outstanding warnings available on demand, and when I had a few minutes and fixed some of them, positive feedback by watching the warning chart slowly go down.

Read More...

Scripts to Detect Data Warehouse Issues

Standards and best practices are like flu shots you take before you’re infected; Database best practices protect your databases from bad things. But, we all make mistakes. It could be because we’re on a time crunch, or we’re lazy (which I’m guilty of by the way), or maybe it’s part of being a developer. Common mistakes include: tables without a primary key, column name problems, missing foreign keys, etc., This is where I love LTD’s very own SQLCop.

Read More...

Stupid me #1 – Locking myself out of SQL Server

I've been thinking lately to do some sort of blog post series. Every time I do something "stupid", which happens from time to time, I'll do a little blog post on what happened and how I solved it. The reason for this is twofold: I'll have a solution online I can consult if it happens again and other people can benefit from my mistakes as well. Because remember the ancient Chinese proverb: "

Read More...