Indexed views are special views that can offer huge performance improvements over regular views. They perform faster because they are stored in the database the same way a table is stored. 378 more words
Tags » T-SQL
It’s been almost 3 years since I updated these SPs! I can’t believe so much time has gone by! Well, I’m sure all of you have been holding your collective breath but I finally have some new updates. 528 more words
In this Script we will look how we can dynamically create the pivot Script to handle the unknown values.
USE AdventureWorks2012; GO CREATE TABLE dbo.Players ( FormatID INT, PlayerID INT , Name NVARCHAR(255) NOT NULL, Formats Varchar(50), Average Int ); INSERT dbo.Players VALUES (1,1, N'MS Dhoni','ODI',55), (1,2, N'Rohit Sharma','ODI',40), (1,3, N'Virat kholi','ODI',60), (1,4, N'ABD','ODI',60), (2,1, N'MS Dhoni','TEST',45), (2,2, N'Rohit Sharma','TEST',35), (2,3, N'Virat kholi','TEST',56), (2,4, N'ABD','TEST',65), (3,1, N'MS Dhoni','T-20',57), (3,2, N'Rohit Sharma','T-20',50), (3,3, N'Virat kholi','T-20',56), (3,4, N'ABD','T-20',68) SELECT * FROM dbo.Players Result we look like this But we want result something like this: 234 more words
You can also restore your SQL Server database using T-SQL instead of SSMS. Today I will show you how to do an easy recovery with restoring just a full backup and another scenario of restoring a full backup and any available transaction logs. 664 more words
I was invited to deliver a session for Belgium User Group on SQL Server and R integration. After the session – which we did online using web based Citrix – I got an interesting question: “ 1,004 more words