SQL SUBSTRING Function – Get Part of String With Example

SUBSTRING function is used in sql to select part of text string in text. This function belongs to the group of text functions – string functions. I created a big summary of T-SQL text functions – you can find it here. Syntax SELECT SUBSTRING(text, <start position of the text character>, <the number of characters to… Read More »

SQL BETWEEN Operator – Defining Range in a Condition with Examples

This operator is used in SQL whenever it is needed to prove if certain value belongs to some range. This operator is used together with “AND” command which defines given range. Operator can be used in most of the clauses but is most common in WHERE for defining limiting requirement. Syntax SELECT [Date] FROM [dbo].[Table]… Read More »

SQL Handling Transaction COMMIT ROLLBACK – Prevent Troubles

What we call a transaction in SQL is logical set or sequence of operations which belong to this transaction. SQL Transactions can be used if we perform some changes in a databases. Advantage of transactions managing is that performed changes are reversible and we always need to use command COMMIT for confirmation or use ROLLBACK… Read More »

SQL CTE (Common Table Expressions) With Examples – More Organized Queries and Procedures

SQL CTE or so called Common table expression is simply put a temporary table (or better said it is a result set) in form of an expression. We can refer to it in SELECT, INSERT, DELETE or UPDATE script after its declaration using clause WITH. We can make recursive queries using CTE (it is even… Read More »

Power BI Report (Dashboard) Tutorial Step By Step

This article is meant to be some kind of a tutorial. After going through it, it should be clearer to you how to create Power Bi report like this on your own. Following this, you can create basically any report you want – company operation report (timesheets, wages, investments), financial analytics (balance sheet, income statement,… Read More »

SQL DELETE TABLE Statement, Difference DELETE and TRUNCATE, Deleting Large Amounts Of Data

We distinguish two types of commands with data deleting purpose – SQL commands DELETE and TRUNCATE. Each is suitable for different situations. It is good to know them both and be able to choose the right one in a specific situation. DELETE Syntax (First Command is Optional): DELETE FROM dbo.Table WHERE <Condition>; or DELETE dbo.Table WHERE… Read More »

Power BI Custom Visuals – Additional Visualizations to Power BI Desktop

Were you ever creating a report and did not find a feature in your Power BI Desktop that would enable you to visualize data according to your needs? What are Power BI Custom Visuals? Custom Power BI visuals were created by members of power BI community – programmers, users, and fans of this wonderful tool.… Read More »

SQL CREATE TABLE- How to Create a Database Table (SQL Server)

Creating a table in the SQL Server database is a basic skill. While creating it using SQL command CREATE TABLE we define: Name of the table together with database definition and scheme List of the columns with appropriate data types, constraints and definition if the column can be empty (NULL vs. NOT NULL) Table can… Read More »

SQL ISNULL and COALESCE Functions – What Are The Differences And Usage

ISNULL and COALESCE are functions used for work with null values (NULL). Both functions return first value out of previously defined entry parameters. There are also some differences between both functions. ISNULL Syntax: SELECT ISNULL(<Column>, <Column Replacement – other column or logic>) FROM dbo.Table  COALESCE Syntax: SELECT COALESCE(<Column>, <Column Replacement – other column or logic… Read More »

SQL View – Create, Alter, Drop View? Do you know Indexed view?

Views have definitely their place in databases and data warehouses. We are talking about objects which are good to use since they do not contain data (do not take up place in storage). They consist only of table query. More complex views can be more expensive for logical operations mostly with complicated queries with multiple… Read More »