Use GETDATE with DATEADD function

SQL Server GETDATE () function and its use cases

December 16, 2021 by

This article will discuss an overview and use cases of the SQL Server GETDATE () function which is used to return the current date and time of the system on which SQL Server instance is running. There are several date-time related functions in SQL Server for distinct requirements like SYSDATETIME, CURRENT_TIMESTAMP, etc. All these functions will return the current date-time of the system on which the SQL Server is running. The only difference of having these many functions is the accuracy of the length of timestamp like till what precision you want to return your date time output. I will show you the output of some of these date-time functions and compare them with SQL Server GETDATE () function.

Read more »

SQL Queries in SQL Server – a beginner’s guide

December 15, 2021 by

Introduction

Creating SQL Queries is a straightforward process. This article is made in SQL Server, but most of the content can be applied to Oracle, PostgreSQL, MySQL, MariaDB and other databases with few changes. The SQL queries allow us to send queries to a database. In this article, we will have a fast, practical tutorial about doing your own queries from scratch.

Read more »
Verify default data paths

Store SQL Server files in Persistent Storage for Azure Container Instances

December 10, 2021 by

In the articles, Deploying Azure Container Instances for SQL Server 2019 and Create Azure Container Instances for SQL Server 2019 using Azure CLI, we explored Azure Container Instances for SQL Server on Linux. These containers are stateless. Therefore, if you stop or restart container instances, you lost your data. Suppose, being a developer, you created a new container database, deployed a few tables, and stored procedures for testing purposes. You do not want to lose these objects or databases even if you destroy your container. Similarly, you also want to reuse those databases if you create a new container instance.

Read more »
Power BI Report created

An overview of Power BI Incremental Refresh

December 6, 2021 by

In this article, we are going to talk about Power BI Incremental Refresh. Power BI is the cloud-based business intelligence tool developed by Microsoft. Using Power BI, users can create various kinds of modern reports and dashboards that provide insights and information of their data in a meaningful way. Power BI is a strong and independent BI tool that is available for both Windows desktop and also the cloud. In order to demonstrate the capabilities of Power BI Incremental Refresh, we will leverage Power BI Desktop to develop and author the data model and then publish it to the Power BI cloud where it will be refreshed incrementally.

Read more »
General Page in New Linked Server

Configure a Linked Server between SQL Server and PostgreSQL using ODBC drivers

December 6, 2021 by

This article explains configuring a linked server between SQL Server 2019 and PostgreSQL. In my previous article named Configure ODBC drivers for PostgreSQL, we got introduced to the ODBC driver of PostgreSQL. We also learned how we could download, install, and configure it. In this article, we will explore how we can utilize the ODBC driver to access the data of the PostgreSQL from SQL Server 2019.

Read more »
Use case with GROUP BY statement

Understanding the SQL MIN statement and its use cases

December 3, 2021 by

Today, I will explain an overview of the SQL MIN () function along with its several use cases in this article. This function is categorized under aggregate functions in SQL Server. Aggregate functions perform a calculation on a set of values from a specified expression and return a single value in their output. Aggregate functions return the same value every time you execute them unless your source data is changed.

Read more »
Azure logical server

BCP for import and export data in Azure SQL Database

December 1, 2021 by

The Bulk Copy Program (BCP) utility can move bulk data between SQL Server instances. You can export SQL Server data into BCP files. You can also use them for moving data from on-premises SQL Server instances to Azure SQL Database. The BCP files do not contain schema or the format information of your data. Therefore, you cannot use it as a database migration tool. However, it is adequate to import or export many rows. However, you need to create the table or use a format file to import data into a table.

Read more »
Restore Azure SQL database

How to restore an Azure SQL Database

November 30, 2021 by

I will explain how to restore an Azure SQL database in case you need to recover some data, or somebody has deleted your database in this article. Databases restore is the common activity a DBA performs in his day-to-day activities to meet various business requirements. We should also perform regular restores to ensure our backups are healthy and restorable in case of any emergency. Here, I will create an Azure SQL database named TestDB along with a table Employee inside this database and then recover them by restoring its automatic backups.

Read more »
Extracting date parts from the timezone - date and time

Working with Date and Time Functions in PostgreSQL

November 26, 2021 by

Working with Date and Time calculations is an integral part of any Data Analytics solution. Be it financial data or any data related to sales, dates always play a pivotal role in analyzing the trends and hence draw a pattern out from them. Some of the most commonly used KPIs that involve date and time calculations are monthly sales, quarterly web traffic, year-over-year growth etc. These KPIs help businesses understand and gauge their performance and also aids in making decisions necessary for their development. In this article, we are going to explore some of the important Date and Time functions that can be used in PostgreSQL and how they can be implemented henceforth.

Read more »