Introduction
  • Introduction
  • Objectives
  • Is this your first session?
  • Resources
Objective 7: Sub-queries
  • Table structure
  • The WHERE clause
  • WHERE and NOT
  • ANY, SOME and ALL
  • The FROM clause
  • The SELECT clause
  • Correlated subquery - WHERE
  • Sub-query
  • Top 5 from various categories
Objective 7e: WITH statement
  • WITH statement
  • Generating a list of numbers
  • Grouping numbers
  • WITH statement
Objective 7b: PIVOTing and UNPIVOTing
  • PIVOT
  • Replacing NULLs in PIVOTs.
  • UNPIVOT
  • Pivotting and Unpivotting
Objective 7d: CTE statement
  • Self-Join
  • Recursive CTE
  • Recursive CTE
Objective 14: Functions
  • Introduction
  • Scalar Functions
  • A more complicated scalar function
  • Inline Table Function
  • Multi-statement Table Function
  • APPLY
  • Functions
Objectives 6b and 6c: Synonyms and Dynamics
  • Synonyms
  • Dynamic SQL
  • Dynamic SQL
Objectives 8c: GUIDs; and Sequences
  • The problems about IDENTITY
  • GUIDs
  • Creating SEQUENCEs
  • Using SEQUENCEs
  • GUIDs and SEQUENCEs
Objective 10: Query and manage XML data - converting tables to XML
  • Introduction to XML - Let's make a shopping list
  • Attributes
  • Creating XML variable and XML field
  • FOR XML RAW
  • FOR XML AUTO
  • FOR XML PATH
  • FOR XML EXPLICIT
Objective 10: Shredding XML data
  • XQuery Value and Exist methods
  • XQuery Modify method
  • XQuery Query method using for and return
  • XQuery Query method using let, where and order by (FLWOR)
  • XQuery Nodes - shredding a variable
  • XQuery Nodes - shredding a table
Objective 10: Other XML considerations
  • Importing and exporting XML using the bcp utility
  • Bulk Insert and Openrowset
  • Schema
  • When should I use XML in SQL Server?
  • Creating Primary and Secondary XML Indexes
Conclusion
  • Bonus Lecture
  • Well done!