Create External Tables in Azure Synapse Analytics

There are many situations in which you need to access the data without loading it to Azure Synapse analytics. The data may be stored in an external data source such as flat files. Azure Synapse Analytics dedicated SQL pool allows you to query external data available on Azure the data lake or Azure Blob storage. In this article, we will check how to create external tables in Azure Synapse Analytics. Create External Tables in Azure Synapse Analytics Create MASTER KEYCreating a Database Scoped CredentialCreating External Data SourceCreate an External File…

Comments Off on Create External Tables in Azure Synapse Analytics

Redshift NULL Handling Functions-Usage and Examples

A NULL value in a relational database is a special marker used in SQL to indicate that a data value does not exist in the database. In other words, it is just a placeholder to denote values that are missing or that we do not know. Almost all relational databases support functions to handle nulls. In this article, we will check Redshift NULL handling functions, usage and some examples Redshift NULL Handling Functions A NULL functions are used to handle NULL values that you may receive as a part of the data. For example, you can use…

Comments Off on Redshift NULL Handling Functions-Usage and Examples

SQL GROUP BY with CUBE Function Alternative in Synapse

Many relational databases such as Oracle, Teradata, etc. support GROUP BY with CUBE function to group the result rows. However, Azure Synapse does not support GROUP BY with CUBE function. In this article, we will check the SQL GROUP BY CUBE function alternative in the Azure Synapse data warehouse. SQL GROUP BY with CUBE Function Alternative in Synapse Similar to the ROLLUP function, CUBE is an extension of the GROUP BY clause. The CUBE allows you to generate subtotals like the ROLLUP extension. In addition, the CUBE extension will generate subtotals for all combinations of grouping columns specified in the GROUP BY clause.…

Comments Off on SQL GROUP BY with CUBE Function Alternative in Synapse

QUALIFY Clause in Synapse and TSQL- Alternative and Examples

The Azure Synapse data warehouse is based on the Microsoft TSQL. If you are migrating from Teradata to Azure Synapse, you will notice that many features are missing in the Synapse date warehouse. The feature such as QUALIFY clause is widely used in Teradata. But, the same feature is not available in Synapse. In this article, we will check what is QUALIFY Clause alternative in Azure Synapse and TSQL. QUALIFY Clause in Azure Synapse and TSQL The relational databases such as Teradata uses QUALIFY clause to filter the result of…

Comments Off on QUALIFY Clause in Synapse and TSQL- Alternative and Examples

Redshift Comparison Operators – ALL, SOME, ANY Alternative

The relational database such as Teradata support SQL comparison operators, including ALL, ANY and SOME. Some databases refer ALL, ANY and SOME as a SQL logical operator. A logical operators is an operator applied to the result of a predicate to determine the result of a search condition. Amazon Redshift does not support ALL, ANY and SOME logical operators. In this article, we will check what are ALL, SOME, ANY comparison operators alternatives in Redshift. SQL Logical Operators ALL, SOME and ANY Before jumping into details about alternative approach, let…

Comments Off on Redshift Comparison Operators – ALL, SOME, ANY Alternative

UnderStanding QUALIFY Clause in Redshift

If you’re familiar with Teradata, you might have used the QUALIFY clause to filter the results of ordered analytical functions. Amazon Redshift also started supporting QUALIFY clause. In this blog post, we’ll explore what the QUALIFY clause does, why it’s useful, and how you can achieve similar functionality in Redshift. Page Content Introduction What is the QUALIFY Clause? How QUALIFY Clause is used in Redshift? Alternatives to the QUALIFY Clause Conclusion Introduction The QUALIFY is one of the important clause as it helps filter results using window functions, similar to how the HAVING clause…

Comments Off on UnderStanding QUALIFY Clause in Redshift

What are INSTR Alternative Functions in Redshift?

The INSTR function in relational databases such as Oracle, Teradata, etc. is used to search a string for a substring and find the location of the substring in the string. The Amazon Redshift does not support the INSTR function. However, there are few string functions that you can use. In this article, we will check what are INSTR alternative functions in Redshift. SQL INSTR String Function The SQL INSTR function returns the location of a substring in a string. Optionally, you can provide the starting position and occurrence of the…

Comments Off on What are INSTR Alternative Functions in Redshift?

SQL INITCAP Function Alternative in Azure Synapse and TSQL

The INITCAP function is one of the quite useful functions you can use to capitalize the first letter (CamelCase) of each word. The popular relational databases such as Oracle, Teradata, etc. support INITCAP function to represent strings in a CamelCase. But, same function will not work on the Microsoft SQL Server or Azure Synapse analytics data warehouse. Both SQL Server and Azure Synapse databases are based on TSQL. In this article, we will check what are the INITCAP function alternative in Azure Synapse and TSQL. INITCAP Function Alternative in Azure…

Comments Off on SQL INITCAP Function Alternative in Azure Synapse and TSQL

SQL LPAD and RPAD Functions Alternative in Synapse and TSQL

Many relational databases such as Oracle, Teradata supports LPAD and RPAD functions. These functions are quite useful when you are formatting data before storing it in a database or displaying data on reports. For example, add zero to integer column. But, Azure Synapse data warehouse which is based on the Microsoft SQL Server TSQL does not support LPAD and RPAD functions. You have to use TSQL built-in functions or create your own user defined functions (UDF). In this article, we will check what are the LPAD and RPAD Functions Alternative…

Comments Off on SQL LPAD and RPAD Functions Alternative in Synapse and TSQL

SQL GREATEST and LEAST Functions Alternative in Synapse and TSQL

Many relational databases such as Oracle, Teradata supports GREATEST and LEAST functions. These functions are quite useful when you are comparing data from two or more columns. But, Azure Synapse data warehouse which is based on the Microsoft SQL Server TSQL does not support GREATEST and LEAST functions. You either have to use a case statement or write your own user defined functions (UDFs). In this article, we will check what are the GREATEST and LEAST Functions Alternative in Synapse and TSQL. GREATEST and LEAST Functions Alternative in Synapse and…

Comments Off on SQL GREATEST and LEAST Functions Alternative in Synapse and TSQL