The SQL Server DBA’s Guide to Teradata

Being a long-time devotee of all things Microsoft SQL Server, I had quite a bit of learning to do to get up to speed on our new Teradata appliance. This guide attempts to distill some of what I have learned. I will primarily focus on what I have found most lacking: examples of how to convert SQL Server T-SQL to Teradata SQL. This guide will use the vendor-supplied sample databases: SQL Server’s AdventureWorksDW2012, and the Teradata’s Express 14.0 Retail database. Also, while this is probably self explanatory, the “mufford” object referenced in the Teradata examples is simply my own personal sandbox. You’ll need to replace any “mufford” reference to whatever your development sandbox may be named. Release History: 2012-08-17 – Added UPDATE examples; reformatted 2012-08-12 – Added date examples 2012-08-08 – Initial Release SELECT Statements Simple SELECT SQL Server: Best practice is to qualify the table schema; qualifying the database is optional unless you plan to perform cross-database queries. USE AdventureWorksDW2012; GO   SELECT TOP 10 ProductKey , EnglishProductName FROM dbo.DimProduct; — OR SELECT TOP 10 ProductKey , EnglishProductName FROM AdventureWorksDW2012.dbo.DimProduct;USE AdventureWorksDW2012; GO SELECT TOP 10 ProductKey , EnglishProductName FROM dbo.DimProduct; — OR SELECT TOP 10 ProductKey , EnglishProductName FROM … Continue reading The SQL Server DBA’s Guide to Teradata