Top Answers to 5 Burning Questions on SQL COALESCE Function

Total: 1 Average: 5

How cool is SQL COALESCE?

It’s cool enough to be so important to me. And I’ll be more than happy to hire a new guy who doesn’t have a bad habit of ignoring the goal of COALESCE. That includes other expressions and functions for handling similar situations.

Today, you will find the answers to the five most-asked questions about SQL COALESCE expression. One of these is being debated over and over again.

Shall we begin?

Read More

3 Easy and Secure Ways to Make Users Run SSIS Packages

Total: 1 Average: 5

Have you ever come across a situation where you needed to make users run SSIS packages? This happens when the user is not comfortable with a fixed schedule for whatever reason. You can’t define if it’s every weekend, at 9 pm, or the 5th of the month. It happens when it happens.

This sounds problematic, depending on the volume of data. If you know that a million or so records won’t be advisable to process any time of the day, say no. But if the data volume is not a problem, what are your options?

Read More

How to Make Sense of SQL Server Geography Data Type

Total: 3 Average: 5

SQL Server Geography data type is unlike other types simply because you don’t use it often. It’s not like varcharintfloat, or DateTime present in every table, at least in one type.

Do we need the SQL Server Geography data type? To make sense of something new, we need to answer three fundamental questions:

What problems does it solve? The answer lies in use cases.
What are the things involved in studying it? You will learn a few basic definitions and acronyms. I collected only the important stuff, so it won’t bore you.
Are there examples to further explain how it works and is it easy to implement? Our kind lives with code. We eat and sleep with it. So, we’re going to have sample codes in this post.

Read More

How to Use SQL Server HierarchyID Through Easy Examples

Total: 5 Average: 5

Do you still hold on to the parent/child design, or would like to try something new, like SQL Server hierarchyID? Well, it is really new because hierarchyID has been a part of SQL Server since 2008. Of course, the novelty itself is not a persuasive argument. But note that Microsoft added this feature to represent one-to-many relationships with multiple levels in a better way.

You may wonder what difference it makes and which benefits you get from using hierarchyID instead of the usual parent/child relationships. If you never explored this option, it might be surprising for you.

Read More

The Easy Guide on How to Use Subqueries in SQL Server

Total: 6 Average: 5

Do you use SQL subqueries or avoid using them?

Let’s say the chief credit and collections officer asks you to list down the names of people, their unpaid balances per month, and the current running balance and wants you to import this data array into Excel. The purpose is to analyze the data and come up with an offer making payments lighter to mitigate the effects of the COVID19 pandemic.

Do you opt to use a query and a nested subquery or a join? What decision will you make?

Read More

7 Facts About SQL Server Synonyms You Should Know

Total: 7 Average: 5

Before SQL Server Synonyms appeared, everyone wished to simplify and enhance their database experience.

Imagine you have an application with a database that references another database from the same server. Then, a major reorganization forces your team to transfer the other database to another server.

There is no doubt your application will break. But what will you do in that case? Link the 2 servers and hardcode all the references (again) to point to the new server?

Read More