Using tsqlt Tests to Practice Queries
In this short article, see how a unit test can be easily written in tsqlt, and how this can help us refactor or build better code.
2022-05-30 (first published: 2019-09-24)
16,216 reads
In this short article, see how a unit test can be easily written in tsqlt, and how this can help us refactor or build better code.
2022-05-30 (first published: 2019-09-24)
16,216 reads
How to get started with Flyway, as simply as possible, using PowerShell. This article provides a practice set of Flyway migration scripts that will build the original pubs database on either SQL Server, PostgreSQL, MySQL, MariaDB or SQLite and then migrate it from version to version, making a series of improvements to its schema design.
2022-05-30
In this article we look at T-SQL script you can use to search for a string in every table and view in every database or in a specific database.
2022-05-30
I'm not a fan of R visuals in PowerBI. I recently learned I can use R to load data and native PowerBI visuals to display the data. Here's how.
2022-05-27 (first published: 2017-10-16)
7,111 reads
You can find memory leaks in Python code with tracemalloc. In this article, Priyanka Nawalramka demonstrates how to use tracemalloc to find the leaks.
2022-05-27
If you can generate a file-based (JSON) model for each new version of a database, produced by a Flyway migration, then you have an easy way to run simple reports to help you search, list, and understand the structure of these databases. I'll show how to produce the models using PowerShell and then run some queries against them to generate the reports.
2022-05-27
The Oracle optimizer often changes the query to get better performance. In this article, Jonathan Lewis explains two more optimizations involving subqueries.
2022-05-25
SQL Prompt users can now share formatting style or code snippets in designated Team spaces on the Redgate Platform. Louis Davidson explains how it works.
2022-05-25
Learn how you can add images to your reports in Power BI when using the Report Builder.
2022-05-23
6,152 reads
See how our end-to-end framework for extending DevOps to your database enables your organization to balance the demand to deliver software fast with the need to protect and preserve business critical data.
2022-05-23
By Steve Jones
I was experimenting with CHOOSE() recently after I was asked a question. In a...
By DesertDBA
I did not expect 27 responses to my T-SQL Tuesday #204 invitation, but it...
Should you adopt an off-the-shelf AI tool, partner with a specialist, build in-house, or...
Has anyone ever seen this before? I have sysadmin permission on a server. I...
Comments posted to this topic are about the item Switching Schema II
Comments posted to this topic are about the item A Practical Approach to Automating...
I run this query:
SELECT s.name AS schemaname , o.name AS objectname FROM sys.objects o INNER JOIN sys.schemas s ON s.schema_id = o.schema_id WHERE o.name = 'Beer'I get two rows back for the objects, named dbo.beer and etl.beer. Both the tables have identical schemas and are not partitioned. There are 25 rows in dbo.beer and 0 rows in etl.beer. I run this code:
ALTER TABLE dbo.beer switch TO etl.beerWhat happens? See possible answers