Excel VBA Introduction Part 58.4 - SQL for Excel Files - Selecting All or Distinct Rows

preview_player
Показать описание


In this video you'll learn how to use the All and Distinct keywords in your SQL query to return either every row from a data source or just the rows with unique values. You'll see how to affect the sorting of the query results using the Order By clause and how to use unique row values to provide users with a choice using drop down lists on a user form.

Chapters
00:00 Topic List
00:39 The Basic Setup
03:06 Using Select All
04:35 Using Select Distinct
05:40 Referring to Different Columns
06:27 Changing the Sort Order
07:22 Including Multiple Columns
08:46 Sorting by Different Columns
10:09 Using Distinct Rows for Drop Down Lists
12:18 How the User Form Works
15:43 Beware of SQL Injection!
17:54 What's Next?

Рекомендации по теме
Комментарии
Автор

I would say this is a deep learning series for ADO for Excel. Thanks for copying and pasting your knowledge to our minds.

imranbhatti
Автор

Thanks Andrew. Love the drop down form. Looking forward to more information.

krn
Автор

Who needs netflix, when this series is going on and on?

thwbn
Автор

Brilliant addition to the series Andrew 👏👌👍there is so much helpful tips and advice thank you, my Yorkie 🐶 was also watching 😀

frikduplessis
Автор

Good explanation and very useful video thank you so much.

khaledseghari
Автор

Andy, is it possible to do joins/unions with different record sets using the ADODB methods? Thanks for everything you do for the community

garrettmichael
Автор

Question: On-time 13:08 why did you use GenrePicker_AfterUpdate event instead of GenrePicker_Click event? and what is the difference between them?

youssefsedkey
Автор

Is it possible to have 2 distincts at the same time?
Like distinct genre have 24 rows and 7 Certificates and 1200 titles.
so if I want to query 1 title each from all genre and certificate.
I guess ideally it should give 24 *7 =168 titles if within each genre there are one film of each certificate.
SELECT DISTINCT [Genre], [Certificate], [Title] AS [Film Name] FROM [Film$]

abinalex
Автор

The minute I saw the ‘Awful’ Genre I could guess what was in that DISTINCT record set 😂

brencostigan
welcome to shbcf.ru