Paging Data in T-SQL
This article will show you how to page through a set of results using the OFFSET and FETCH options of the ORDER BY clause.
2023-06-28
This article will show you how to page through a set of results using the OFFSET and FETCH options of the ORDER BY clause.
2023-06-28
Learn how to replace text in SQL Server strings using the REPLACE and TRANSLATE functions and how these could be used for data manipulation.
2023-05-19
I often perform code reviews and thought it would be fun to frame this exercise: a completely fictitious stored procedure hits my desk, I’ll reject it of course, and enumerate the reasons why.
2023-05-10
The need for performance tuning your SQL Server workloads has never been more critical. As workloads are moved into cloud services, their efficiency has a direct impact on the recurring bills. A workload that consumes more resources than necessary costs more to host in the cloud and affects the bottom line for your organization.
2023-04-07
10,336 reads
The CASE expression is one of the most valuable tools in your T-SQL toolbox. I use it in almost every query I write. However, there isn't a direct equivalent of CASE in DAX. Since it's a different language entirely, I don't expect it. As my grandmother used to say, I am not surprised, just disappointed. If you don't know, DAX (Data Analysis Expressions) is a language for creating custom calculations and aggregations in Power Pivot, Power BI, and other data analysis tools. Two functions in DAX come close to replicating the functionality but come with limitations. Which one of these functions should you use? Please stay tuned.
2023-04-03
Introduction ChatGPT in SQL Server In this article, we will learn some basic examples of ChatGPT in SQL Server. In a previous article, we had an interview with ChatGPT an AI chatbot developed by OpenAI. If you do not know how to use it yet, you can go to that article. We will show some […]
2023-03-06
46,447 reads
Learn the basics of the ROUND() function in this article.
2022-12-02
2,978 reads
This article shows how you can query your database files to get metadata about them and use that to get the reads, writes, and other IO statistics.
2022-11-18
7,944 reads
You can master engineering for your SQL Server databases, on premises or in the cloud, with a FREE toolkit!
2022-10-28
4,654 reads
Learn how you can easily analyze the data lineage in your SQL Server database.
2022-10-19
7,306 reads
Data isn't just about numbers and spreadsheets. It holds stories, patterns, and the answers...
By Brian Kelley
When I look at a system and think about its security model, the first...
On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...
Comments posted to this topic are about the item The "ORDER BY" clause behavior
Comments posted to this topic are about the item Are IT Certifications Still Relevant?
I have table TicketNumbers i TicketNumber UID 2 10 09901a22c7c3acc6786847c775f1d113 6 5 00dad28bef21f916240d6e8c1c1bd67d 12 ...
Let’s consider the following script that can be executed without any error on both SQL Sever and PostgreSQL. We define the table t1 in which we insert three records:
create table t1 (id int primary key, city varchar(50)); insert into t1 values (1, 'Rome'), (2, 'New York'), (3, NULL);If we execute the following query, how will the records be sorted in both environments?
select city from t1 order by city;See possible answers