TSQL Pivot Rotations using only REPLACE
Pivoting SQL Server tables is always awkward, even with the PIVOT and UNPIVOT operators. If you want to get the job done without GROUP BY or PIVOT, here is a way to do it using only REPLACE.
Pivoting SQL Server tables is always awkward, even with the PIVOT and UNPIVOT operators. If you want to get the job done without GROUP BY or PIVOT, here is a way to do it using only REPLACE.
Join us on April 6th in Omaha for SQL Saturday #197. SQLSaturday is a training event for SQL Server professionals and those wanting to learn about SQL Server.
This Friday Steve Jones talks about xp_cmdshell and the security regarding its use. Do you have any holes that might exist if administrators are allowed to use this tool on their instances?
In this tip we will look at one way to achieve control of stored procedures to ensure that reuse is for the intended purpose and changes do not break other applications that may be using this same code.
A case study shows how the combination of Azure and Hadoop helped the Halo 4 team grow their successful franchise.
This article brings you a technique and framework to use in your stored procedures that can allow you to re-throw and log errors.
When you need to shred just part of the data within a large XML file into a SQL Server table, the most efficient way is to just select what you need via XQuery or by using XPath, before shredding it into a table. But precisely how would you do that?
When compared with HASHBYTES, CHECKSUM, has a number of drawbacks. Hence, a question that comes up is: Is Checksum really required? In this article, I attempt to answer that question.
SQL Server Central’s Steve Jones and Red Gate’s Grant Fritchey will be among a stellar line-up of speakers at SQL Intersection conference in Las Vegas on the 8th to the 11th of April.
Steve Jones is looking forward to learning more about I/O. There is a panel of experts, taking questions at SQL Intersection in a few weeks.
By Brian Kelley
If you want to learn better, pause more in your learning to intentionally review.
By John
If you’ve used Azure SQL Managed Instance General Purpose, you know the drill: to...
By DataOnWheels
Ramblings of a retired data architect Let me start by saying that I have...
Hello team Can anyone share popular azure SQL DBA certification exam code? and your...
Comments posted to this topic are about the item Faster Data Engineering with Python...
Comments posted to this topic are about the item Which Result II
I have this code in SQL Server 2022:
CREATE SCHEMA etl;
GO
CREATE TABLE etl.product
(
ProductID INT,
ProductName VARCHAR(100)
);
GO
INSERT etl.product
VALUES
(2, 'Bee AI Wearable');
GO
CREATE TABLE dbo.product
(
ProductID INT,
ProductName VARCHAR(100)
);
GO
INSERT dbo.product
VALUES
(1, 'Spiral College-ruled Notebook');
GO
CREATE OR ALTER PROCEDURE etl.GettheProduct
AS
BEGIN
exec('SELECT ProductName FROM product;')
END;
GO
When I execute this code as a user whose default schema is dbo and has rights to the tables and proc, what is returned? See possible answers