By Andrew Gould
Writing SQL for Excel with ADODB playlist https://youtube.com/playlist?list=PLNIs-AWhQzckUd5i0E1xeSFeBAonYIurK
VBA Working with Databases playlist https://youtube.com/playlist?list=PLNIs-AWhQzclbRVLCZlsFvpz6fz2nPGbt
Get files here https://www.wiseowl.co.uk/vba-macros/videos/vba-ado-net-recordsets/sql-excel-union/
If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos, you can click this link https://www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching!
This video shows you how to write basic Union queries in SQL for Excel. You'll learn how to merge two or more tables into a single list and the difference between Union and Union All. You'll understand the importance of selecting the same number of columns and how to map columns with different names. You'll also learn how to sort the results of a Union query, how to add calculated columns and how to add criteria.
Chapters
00:00 Topic List
00:44 The Basic Setup
02:57 A Basic Union Query
04:22 Union vs. Union All
06:13 Sorting the Results of a Union Query
08:17 Mixing Numbers of Columns
09:37 Selecting Specific Columns
10:53 Specifying Columns in Each Select Statement
12:34 Creating a Column Alias
13:14 Adding a Calculated Column
15:17 Sorting by a Column Alias
16:26 Adding a Where Clause
19:30 What's Next?
Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Power BI, DAX, SQL Server, Reporting Services, Analysis Services, Integration Services, ASP.NET, C#, Visual Basic, Microsoft Access and more