From the course: Querying Microsoft SQL Server 2022

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Solution: Retrieve matching text strings

Solution: Retrieve matching text strings - SQL Server Tutorial

From the course: Querying Microsoft SQL Server 2022

Solution: Retrieve matching text strings

(upbeat music) - [Instructor] Were you able to locate the vendors that match my requirements? Let's take a look at how I would solve the challenge. I'm going to go into the AdventureWorks database and we'll expand tables. We'll take a quick look at the table that we're working with. That is the Purchasing.Vendor table. So here's all the columns that we can use. And for this challenge, I think we only need the values that are stored in the Name column. We really don't need any of these other ones. So let's just start up a new query and we'll select that column name from Purchasing.Vendor. And I'm going to execute the query just to see what our starting place is. So it looks like we have a total of 104 rows of data that we have to work with. Now the first part of the challenge was to find all the vendors that started with the letter C. So we'll add in a where clause. And we're going to search on the name field.…

Contents