2012-06-20 (first published: 2012-05-30)
8,738 reads
2012-06-20 (first published: 2012-05-30)
8,738 reads
A script to help you find the Precision & Scale parts of a decimal value.
2012-06-19 (first published: 2012-06-04)
4,926 reads
Generate a script of insert statements with column names for any table including those with identity columns.
2012-06-15 (first published: 2012-05-22)
3,140 reads
Sometimes you just need to populate a CHAR/VARCHAR column for testing with a random selection of string literals at table CREATE time. Here is a quick and easy script.
2012-06-14 (first published: 2008-01-16)
1,171 reads
SQL Server 2012 introduces a new string concatenation function. This can be recreated in earlier versions of SQL Server.
2012-06-06 (first published: 2012-05-16)
2,169 reads
These are scripts I run each morning on my registered CMS servers to check immediate health.
2012-06-04 (first published: 2012-05-09)
2,886 reads
The code below uses a CASE STATEMENT to group sales data based on date,week,month and quarter. It should be executed in AdventureWorks 2005 or 2008.
2012-05-30 (first published: 2012-05-10)
2,037 reads
This function returns all the necessary version information in a table.
2012-05-28 (first published: 2012-03-21)
3,164 reads
Script to list out all fragmented indexes for a given database, with options to only view them, reorganize them, or rebuild them in one fell swoop.
2012-05-25 (first published: 2012-05-15)
3,241 reads
Displays the last Full, Diff, and Log backup taken. If no backup has been taken that is displayed as well.
2012-05-24 (first published: 2012-05-15)
1,488 reads
By Vinay Thakur
Continuing from Day 3 where we covered LLM models open/closed and their parameters, Today...
By Steve Jones
One of the nice things about Flyway Desktop is that it helps you manage...
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
hi everyone I am not sure how to write the query that will produce...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers