Generating SubTotals using GROUPING
This article explains how to use the GROUPING clause to generate subtotals for rows in a very easy fashion.
2012-11-16 (first published: 2010-07-13)
38,002 reads
This article explains how to use the GROUPING clause to generate subtotals for rows in a very easy fashion.
2012-11-16 (first published: 2010-07-13)
38,002 reads
2012-05-07
2,543 reads
Procedure to find any object such as table/stored procedure by its name, or find for ant text inside stored procedures, functions.
2012-04-18 (first published: 2008-05-28)
2,984 reads
2011-11-17
2,503 reads
2011-10-10
2,763 reads
2010-10-28
3,114 reads
2010-03-25
4,400 reads
This article displays how we can place charts in reports created using SSRS.
2010-02-01
12,813 reads
In this article I have shown a way of writing queries in which WHERE clause of the query is executed dynamically depending on values of input parameters.
2009-06-01
19,351 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers