Posts tagged with: sql

Quickly Defining a Table Structure From a Query

I recently saw a comment that described getting data into a temp table using SELECT <Columns> INTO <Table>.  The main reason this was done was just for convenience and to speed up getting to the answers they ultimately needed. For...
Continue Reading →

T-Shirt Series: The Temporary Line

Throughout the T-Shirt series we have discussed Temp Tables, Table Variables, Derived Tables, and Common Table Expressions (CTE). In this post I will summarize high level differences under normal circumstances. See the articles above for further details. Temp Table Table...
Continue Reading →

T-Shirt Series: The CTE (Common Table Expressions)

I have been asked what is the difference between Temp Tables, Table Variables, CTEs, and Derived tables. So I thought I would take this opportunity to do a short blog post on each and then summarize the differences. I like to...
Continue Reading →

Generate XSD from Sql query using FOR XML

Transitioning from site specific prototypes to more standardized products for delivery to multiple customer sites has been a driving factor for separating custom source system translations from the product itself. This has led to many of our products having a...
Continue Reading →

T-Shirt Series: Derived tables

I have been asked what is the difference between Temp Tables, Table Variables, CTEs, and Derived tables. So I thought I would take this opportunity to do a short blog post on each and then summarize the differences. I like...
Continue Reading →

T-Shirt Series: The Misunderstood Table Variable

I have been asked what is the difference between Temp Tables, Table Variables, CTEs, and Derived tables. So I thought I would take this opportunity to do a short blog post on each and then summarize the differences. You can check...
Continue Reading →

Incorrect SQL71558 error when joining synonyms in SSDT

I recently ran into an issue where the SSDT compiler in Visual Studio was misreporting an error and I wanted to post about the setup and work-around. SSDT, also known as SQL Server Data Tools, is an add-in for Visual...
Continue Reading →

T-Shirt Series: What is so special about “TEMP” Tables

I have been asked what is the difference between Temp Tables, Table Variables, CTEs, and Derived tables.  So I thought I would take this opportunity to do a short blog post on each and then summarize the differences. Today we...
Continue Reading →

Troubleshooting a Full Transaction Log

Transaction logs are one of the most critical parts of a database and should be managed as such. Running out of disk space can cause application errors and even database corruption. If your transaction log is continually growing there are...
Continue Reading →

Defensive Database Programming

There I was minding my own business having breakfast and reading SQL Server Central‘s editorial when I saw a link to Alex Kuznetsov’s Defensive Database Programming book. I read the book a year or so ago, and much of it will not come as any...
Continue Reading →