DBCC CheckIdent
Being day six of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKIDENT. Description: DBCC CHECKIDENT is used for check on… Read More »DBCC CheckIdent
Being day six of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKIDENT. Description: DBCC CHECKIDENT is used for check on… Read More »DBCC CheckIdent
SQL Server 2012 adds many new features to Transact SQL (T-SQL). One of my favorites is the Rows and Range enhancements to the over clause.… Read More »Rows and Range, Preceding and Following
SQL Server 2012 introduces a new T-SQL object used to generate numbers, a SEQUENCE, similar to an identity column. You can think of a sequence as a take… Read More »Using a SEQUENCE object to generate letters.
On my computer I run SQL Server 2012, and I use a number of test or development databases. I don’t run backups on these because… Read More »Shrinking a Log File on a Test or Development Server
Last month I posted another CTE blog entry Using a CTE to Split a String Into Rows with Line Numbers. Since then I have used it… Read More »VARCHAR diff function
Last year while working on my CTE presentation for a SQL Saturday I added a blog post called “Using a CTE to Split a String… Read More »Using a CTE to Split a String Into Rows with Line Numbers
When creating a table you can specify IDENTITY with the following syntax: For example The IDENTITY property is valid for data types of the integer… Read More »Are you wasting half the capacity of IDENTITY?
As shown in my previous posting on SEQUENCES, they are a user-defined object that generates a sequence of numeric values in Transact SQL 2012. But what… Read More »TSQL 2012 – Generating letters with a SEQUENCE object
I came across this example when preparing my CTE presentation for SQL Saturday in Portland OR in 2 weeks. Which produces the following output.
Have you ever needed to generate a list of dates for the last 30 days. There are lots of different ways to do this with… Read More »Recursive CTE to Calculate Dates for the Last 30 Days