Using Common Table Expressions

Slides:



Advertisements
Similar presentations
Welcome to CODE SPREAD Simple Concepts of Coding | Programming.
Advertisements

Chapter 18 - Data sources and datasets 1 Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Sample queries Practice in using Oracle SQL (1 of 2)
Alonso Robles Solutions Architect speakTECH
04 | Customize Team Foundation Server for Team Use Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence.
Module 2: Using Transact-SQL Querying Tools. Overview SQL Query Analyzer Using the Object Browser Tool in SQL Query Analyzer Using Templates in SQL Query.
Said Salomon  I has over 25 year experience as an Information Technology Professional. He has a vast array of abilities.
Sofia, Bulgaria | 9-10 October TSQL Enhancements in SQL Server 2005 Stephen Forte CTO, Corzen Inc Microsoft Regional Director NY/NJ (USA) Stephen Forte.
Introducing Reporting Services for SQL Server 2005.
Introduction to the English Language Institute Information Management System Migration from Access 97 to Access 2007 and SQL Server ******* Bidders’ Conference.
Developers of a suite of products to help you monitor and optimize Windows/SQL Server performance o Performance Advisor – awareness and control over Windows.
SQL Server 2000 Acropolis Institute of Technology and Research Database fundamentals Prepared By: Rahul Patel.
1 Agenda for Class 03/07/2006  Learn to simplify queries for complex questions through the use of views.  Concept of a view.  Syntax to create and access.
Chris Testa-O’Neill QA. Who am I Chris Testa-O’Neill Business Intelligence Specialist at QA Technical Author for Microsoft E-Learning Author of the SQL.
SQL Reporting Services From a Developers Perspective Adam Calderon Principal Engineer Interknowlogy LLC
Module 4 Designing and Implementing Views. Module Overview Introduction to Views Creating and Managing Views Performance Considerations for Views.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Adding Parameters to Commands ADO.NET - Lesson 06  Training time: 15 minutes.
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Peter Peng. Agenda Introducing A simple example More complex examples (in part 2) Developing (in part 3)
Session id: Darrell Hilliard Senior Delivery Manager Oracle University Oracle Corporation.
Sofia, Bulgaria | 9-10 October SQL Querying Tips & Techniques Richard Campbell.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
SQL Server Reporting Services for.NET Developers Bret Stateham
Splits, Merges and Purges THE HOW TO OF TABLE PARTITIONING.
SQL Introduction SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English.
Defense In Depth: Minimizing the Risk of SQL Injection
Recommended Practices & Fundamentals
Discussion Points for GP Reporting
Using Common Table Expressions
Justin Randall SQLintersection Session: Friday, 10:00am-11:15pm Automating SQL Server Administration Using SQLCMD Justin Randall.
Tools for Performance, Load Testing, Stress Testing Using Telerik Test Studio Pavel Pankov QA Lead Automated Testing Team Telerik QA Academy.
SQL Server Reporting Service & Power BI
The Basics of Dashboards
Report Builder as Self Service BI Solution
PEL Vs MDX By Jeremy Kashel TVP, 17th July 2008
T-SQL: Simple Changes That Go a Long Way
T-SQL: Simple Changes That Go a Long Way
Efficiently Searching Schema in SQL Server
Creating Dashboards by using PerformancePoint 2010
Recursion in SQL Basic recursive WITH statement ― Demo.
MongoDB for Developers
MongoDB for SQL Developers
SSRS Data-Driven Subscriptions
Using Indexed Views & Computed Columns for Performance !
Cardinality Estimator 2014/2016
In-Memory OLTP (IMOLTP) What Can It Do For Me?
The Killing Cursors Cyndi Johnson
Query Optimization Techniques
SoftReports Common Table Expression (CTE) ♫ SNUG 2014 ♫
Recursion in SQL Nonlinear and Mutual Recursion.
Welcome to SQL Saturday Denmark
Introduction to SSIS: Project Deployment
SQL Saturday New York City May 19th, 2018
Reporting Services... A reborn product
SSRS Data-Driven Subscriptions
Table Partitioning Intro and make that a sliding window too!
Welcome to SQL Saturday Denmark
Cyndi Johnson Senior Software Engineer at AdvancedMD Killing Cursors.
Multi-client SSAS deployment
SSDT and Database Project Basics
Table Partitioning Intro and make that a sliding window too!
Table Partitioning Intro and make that a sliding window too!
Navigating Your GP Data
Ridewaan Hanslo ridewaanhanslo
Cyndi Johnson Senior Software Engineer at AdvancedMD Killing Cursors.
SQL Server 2005 Reporting Services
Query Optimization Techniques
Creating and Using Calendar Tables
T-SQL: Simple Changes That Go a Long Way
Just Enough SSIS Scripting to be Dangerous.
Presentation transcript:

Using Common Table Expressions Ben Galluzzo www.bengalluzzo.com ben_galluzzo@yahoo.com @BenGalluzzo bengalluzzo@otterbits.com SQL Saturday #524 – Sout Florida 2016

Introduction 2 | SQL Saturday #524 – South Florida 2016

Introduction 3 | SQL Saturday #524 – South Florida 2016

SSRS Data-Driven Subscriptions 4 | SQL Saturday #524 – South Florida 2016

SSRS Data-Driven Subscriptions Overview SSRS Subscriptions SSRS Data-Driven Subscriptions Enhancing Our Use of DDS Mini Discussion On Scheduling & Monitoring 5 | SQL Saturday #524 – South Florida 2016

CTE Introduction 6 | SQL Saturday #524 – South Florida 2016

Using Common Table Expressions CTE Overview CTE Structure Uses Basics (demo) SSRS Data-Driven Subscriptions (demo) Rolling Period (demo) Resources 7 | SQL Saturday #524 – South Florida 2016

CTE Overview Characteristics can be used in same fashion as subquery similar to views (disposable views) recreated every time with each use can be used to simplify complex queries sometimes can improve maintainability of code can reference itself (becomes recursive) unable to access main query 8 | SQL Saturday #524 – South Florida 2016

CTE Syntax ;WITH <cte_name> AS ( [query] ) SELECT [statement] FROM <cte_name>; 9 | SQL Saturday #524 – South Florida 2016

CTE – Basic Examples DEMO 10 | SQL Saturday #524 – South Florida 2016

CTE – SSRS Data-Driven Subscription DEMO 11 | SQL Saturday #524 – South Florida 2016

CTE – Rolling Periods DEMO 12 | SQL Saturday #524 – South Florida 2016

Resources WITH common_table_expression CTE Basics https://msdn.microsoft.com/en-us/library/ms175972.aspx CTE Basics https://www.simple-talk.com/sql/t-sql-programming/sql-server-cte-basics/ 13 | SQL Saturday #524 – South Florida 2016

Steps For Adding A DDS Description* DataSource Details Command/Query Delivery Extension Settings Report Parameters Schedule Details 14 | SQL Saturday #524 – South Florida 2016

Resources SSRS Report Samples Report Builder AdventureWorks 2012 SSRS Samples http://advworks2012sssrs.codeplex.com SQL Server Product Samples: Reporting Services http://msftrsprodsamples.codeplex.com Report Builder Report Builder 3.0 http://www.microsoft.com/en-us/download/details.aspx?id=6116 Report Builder 2.0 http://www.microsoft.com/en-us/download/details.aspx?id=24085 15 | SQL Saturday #524 – South Florida 2016

Additional Resources SSRS Subscription Topics Subscriptions and Delivery (Reporting Services) https://msdn.microsoft.com/en-us/library/ms159762.aspx How to Configure Report Subscriptions in SSRS https://technet.microsoft.com/en-us/library/cc872783.aspx 16 | SQL Saturday #524 – South Florida 2016

Professional Groups SQL Saturday #524 – South Florida 2016

Thanks to our Sponsors SQL Saturday #524 – South Florida 2016

Thanks to our Volunteers SQL Saturday #524 – South Florida 2016

Using Common Table Expressions Ben Galluzzo www.bengalluzzo.com ben_galluzzo@yahoo.com @BenGalluzzo bengalluzzo@otterbits.com SQL Saturday #524 – South Florida 2016