Using a column name in a COUNT function
Putting a column name in a COUNT() function may not always give you what you are looking for.
Putting a column name in a COUNT() function may not always give you what you are looking for.
ETL ( Extract, transform, load) doesn't have to be like a spell on hell. To make a success of ETL systems, you need the freedom and ability to make graceful U-turns when you detect a mistake in architecture or configuration: to fix the root problem rather than to merely tackle the symptoms. Feodor lists the eight most common root causes of failure in ETL systems, and how to fix them.
Database ownership is an old topic for SQL Server pro's. Check this simple lab to learn the risks your databases can be exposed to.
We are managing more and more systems and databases all the time. To Steve Jones, that means we must be able to work at scale.
In data mining, we sometimes need to perform techniques such as Z-score normalization on numeric data type columns to prevent one column from skewing or dominating the models produced by the machine learning algorithms. Dallas Snider explains how to perform this in SQL Server with T-SQL code.
If you can examine and understand execution plans, you can achieve better understanding of the database system and you will write better database code. Grant Fritchey shows you how.
In this chapter we will talk about security recommendations for SQL Server Data Mining.
In this chapter we will talk about security recommendations for SQL Server Data Mining.
Grant Fritchey reviews Midnight DBA's Minion Reindex, a highly customizable set of scripts that take on the task of rebuilding and reorganizing your indexes.
How do you find time for learning? More importantly, Steve Jones asks if you find time for actual use of your knowledge.
By Steve Jones
It’s Prime Day. A few of my recommendations, since I want to do some...
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers