2011-05-30 (first published: 2011-05-23)
2,418 reads
2011-05-30 (first published: 2011-05-23)
2,418 reads
Script generator to restore to a new DB. Designed on Ola Hallengren's backup solution.
2011-05-27 (first published: 2011-05-20)
964 reads
This procedure works like the sp_spaceused procedure but this one shows statistics for all tables in the selected database or for all databases (excluding tempdb and model).
2011-05-25 (first published: 2008-03-05)
10,174 reads
SQL Auditing - Generate a listing of the SQL logins, and the permissions for each database on a server.
Update to Simon Facer's script.
2011-05-23 (first published: 2007-09-25)
13,390 reads
2011-05-23
314 reads
Query Active Directory to get information on user logins.
2011-05-19 (first published: 2011-05-16)
3,870 reads
Stored procedure to backup all DB (chose user or system). You can do full, differential and log backups
2011-05-13 (first published: 2011-05-06)
3,122 reads
View login information for all accounts that use SQL authentication.
2011-05-12 (first published: 2011-05-09)
2,950 reads
Find the last day (or number of days in a month) in one statement without having to use IFs or BUTs.
2011-05-10 (first published: 2011-04-29)
2,426 reads
This script is used for drop and create a new or existing user. IF User is already exists in database then first it will dropped and then recreate.
2011-05-05 (first published: 2011-04-28)
1,797 reads
By Brian Kelley
I developed these rules a while back, before COVID. I had a period of...
By Steve Jones
Someone asked why I would use TRY_PARSE after I posted a question at SQL...
My mugI grew up surrounded by coffee farms in Guatemala and somehow spent most...
I have a table that ends in ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]. I'm about to...
WA CS 082225313145 WWH2+WP2, Jl. Pangeran Diponegoro No.54, Tamanan, Kec. Tulungagung, Kabupaten Tulungagung, Jawa...
Comments posted to this topic are about the item OUTER APPLY Fundamentals: Part 2
I have this data in the OrderHeader table in a SQL Server 2025 database (ordered by CustomerID ASC):
orderid orderdate customerid complete 3 2025-05-10 00:00:00.0002 1 21 2024-01-10 00:00:00.0003 1 15 2023-10-28 00:00:00.0004 1 13 2025-03-08 00:00:00.0006 1 11 2024-04-02 00:00:00.0007 1If I run this query, how many rows are returned?
SELECT * from dbo.OrderHeader where customerid between 3 and '6'See possible answers