Advanced SQL Tutorial | String Functions + Use Cases

Advanced SQL Tutorial | String Functions + Use Cases

Alex The Analyst

3 года назад

183,102 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@victoradams8089
@victoradams8089 - 14.09.2024 11:31

Can some employ the UPDATE function in this case?

Ответить
@plucks86
@plucks86 - 08.07.2024 05:02

Using The Office names was dope.

Ответить
@banku3708
@banku3708 - 29.03.2024 15:23

Can’t u use update instead of the replace . Because I used update and it got it done

Ответить
@pourannazariansamani1400
@pourannazariansamani1400 - 12.03.2024 19:16

Hi Alex! by running substring code , I didn't get the result in the table??

select err.FirstName, substring(err.FirstName, 1,3), dem.FirstName, substring(dem.FirstName, 1,3)
From EmployeeErrors err
join EmployeeDemographics dem
on substring(err.FirstName, 1,3) = substring(dem.FirstName, 1,3)

Ответить
@yanpaucon1043
@yanpaucon1043 - 11.03.2024 16:18

It only showed jim and Pam, I don't know why it didn't show Toby.

Ответить
@Ifeypeters
@Ifeypeters - 02.03.2024 08:30

Thank you so much Alex, you've been a great help to my Data analytics journey. I noticed the original inputs on the error table doesn't change after using the TRIM functions, how do we achieve this?

Ответить
@THEMBAFORTUNEMOLOI
@THEMBAFORTUNEMOLOI - 21.02.2024 18:01

The fuzzy matching code does not work for TOby on my end, it only works for Jim and Pam

Ответить
@al-kaviulsarker9733
@al-kaviulsarker9733 - 04.02.2024 15:51

I did not understand the fuzz matching and why only TOby came as outcome?

Ответить
@charitaa1218
@charitaa1218 - 02.02.2024 22:53

What if we want to filter numbers instead of strings based on first 3 or last 3 values from a column,is there a specific alternative to substring function?

Ответить
@avidhakal6451
@avidhakal6451 - 30.01.2024 16:42

Hey alex thanks for the video
Just a question
Why do sometime i need to refer to whole database and sometimes just the table name while refering to the tables during join or some other operations ?

Ответить
@catarinamacedo2864
@catarinamacedo2864 - 02.01.2024 16:04

I didn't see bad data at all hahahah It'd not be a surprise if Michael Scott put Fired as the last name of Toby and write it wrong, and put Beasely and Jimbo nicknames as well 😂😂Gotta love the consistency with the show in this tutorial

Ответить
@PlayerOne-GT
@PlayerOne-GT - 14.12.2023 19:17

👍

Ответить
@dlcrdz00
@dlcrdz00 - 12.12.2023 20:28

I noticed that some commands were written in lowercase and some in uppercase; is there a best practice procedure using either format?

Ответить
@chrisomoha636
@chrisomoha636 - 28.11.2023 23:05

great lesson

Ответить
@asiagladden3080
@asiagladden3080 - 28.11.2023 21:56

This was so clever! Thank you!

Ответить
@1440MAP
@1440MAP - 19.11.2023 18:57

Learned. Thank you!

Ответить
@lorainemukwauri9349
@lorainemukwauri9349 - 19.11.2023 01:09

Hey Alex,great fan of your work by the way, but the SUBSTRING concept was poorly explained.

Ответить
@عابثالأخير-ز9ي
@عابثالأخير-ز9ي - 16.11.2023 18:43

Many thanks for
great tutorial. 🙌🏻

Ответить
@emekahenry8140
@emekahenry8140 - 15.11.2023 17:07

Using Replace:
Flenderson-fired nothing Changed. Mine didn't work.
Any help

Ответить
@uchindamiphiri1381
@uchindamiphiri1381 - 03.11.2023 12:57

I am really enjoying this. at first I tried all programming languages but now I think I know what I want. I want to be a data scientist and am sure taking a data analytics course to master these skills first isn't wrong right?

Ответить
@manthansharma2578
@manthansharma2578 - 02.11.2023 09:33

Hi Alex, Thanks for the boot camp, Really helpful for newbies. Just a question, Why can't we just use the update command instead of replace,
Like:
Update EmployeeErrors
Set LastName = 'Flenderson'
Where Firstname = 'Toby'

The outcome is the same.

Ответить
@kate_david
@kate_david - 20.10.2023 17:09

Hi Alex, thank you for this tutorial.
I am getting an error for the substring - Invalid object name ‘EmployeeDemographics’
Please how do I sort this? I’m stuck

Ответить
@havinashz
@havinashz - 10.10.2023 15:23

as a fellow office fan and an aspiring data analyst i love your content

Ответить
@rajkumarrajan8059
@rajkumarrajan8059 - 23.09.2023 09:48

Hi Alex,
How can we do a proper case in SQL?
Is there a way to do that?

Ответить
@s.g.937
@s.g.937 - 14.09.2023 03:56

And if we wanted to lower case just the second letter of the name TOby for example, or any other name in which the second letter is uppercase we could use the following:
*LEFT meaning only the letters starting from the LEFT, and the number 1 means only 1 letter. Basically only the first left letter.
*LEN meaning the length of the name, so basically this will use the maximum length of the name.
SELECT FirstName, UPPER(LEFT(FirstName,1)) + SUBSTRING(LOWER(FirstName),2,LEN(FirstName)) AS CorrectedName
FROM SQLTutorial..EmployeeErrors

But is there a better and shorter way ?

Ответить
@islammounier1477
@islammounier1477 - 10.09.2023 15:31

i just wanna ask there are upper and lower ..what about the proper is it exist or not ?

Ответить
@islammounier1477
@islammounier1477 - 10.09.2023 14:45

this course is very useful and quick not boring at all 😍🤩🤩

Ответить
@justmedidi
@justmedidi - 29.08.2023 18:16

learning this is great, but how can these changes/fixes be made permanent? when i go through the examples, the table with errors still contain the errors and the data doesn't update..

Ответить
@DavidBurgermeister
@DavidBurgermeister - 04.08.2023 01:44

Why use LTRIM and RTRIM at all? Why not just TRIM everything?

Ответить
@YouTubeVenJiX-zl4bj
@YouTubeVenJiX-zl4bj - 19.07.2023 13:06

Hello sir can you please make one separate video on substring 🙂

Ответить
@joshuasolano9631
@joshuasolano9631 - 18.07.2023 18:04

Is this for checking purpose or editing purpose?

Ответить
@SamFisherman59
@SamFisherman59 - 10.07.2023 23:45

loved the "Flenderson - Fired" ... good idea to keep the video informative and fun ... very clever.

Ответить
@rahathussain9313
@rahathussain9313 - 09.06.2023 17:30

how do i correct table.EmployeeErrors ID-1002 row of extra spacing through sql not manual replacing

Ответить
@chefernandez563
@chefernandez563 - 30.05.2023 15:39

im a marketing major trying to learn data analytics, i do not have any background in programming so i dont understand the substring function at all I cant imagine a use for it other than getting a few characters from a first name for example. watched it over still dont get it😂

Ответить
@newbie6377
@newbie6377 - 25.05.2023 21:00

why do i have two rows of TOby after executing ?

Ответить
@swetachaudhary6826
@swetachaudhary6826 - 18.05.2023 15:05

Its not working for me

Ответить
@elizabethwillrealtor
@elizabethwillrealtor - 01.05.2023 18:01

Hi Alex, thank you ones again for putting this together.

I have a little challenge.
The substring didn't fully work for me. The command was right. It displayed only the column but didn't display the datas.
The other string worked just right.

How do I fix this please?

Ответить
@amaoamao9443
@amaoamao9443 - 25.04.2023 18:36

Thank you! I did learn a lot!

Ответить
@paarthkohli6552
@paarthkohli6552 - 20.04.2023 14:54

I like those references to The Office 😂

Ответить
@FrederickFongTW
@FrederickFongTW - 17.04.2023 16:21

More information on this.... need to watch more than once 😂

Ответить
@Babulal32218
@Babulal32218 - 17.04.2023 07:18

Length function can be used to understand change post RTRIM better

Ответить
@anthonyd9043
@anthonyd9043 - 06.04.2023 00:45

Thanks Alex, I'm curious if there's a TITLE string command to revert back to "Title" case from either "UPPER" or "lower", something I come across occasionally.

Ответить
@faizlabunu4460
@faizlabunu4460 - 05.04.2023 21:42

again this toby caught me offguard, finally toby got fired after didnt get raise salary and got deleted from list XD

Ответить
@antoniolupen6138
@antoniolupen6138 - 04.04.2023 18:03

But in reallity you aren´t correcting anything since the SELECT statement jost present a view of the table but altering nothing

Ответить
@alaeddinmsetri4788
@alaeddinmsetri4788 - 25.03.2023 19:27

Good expalanation thanks

Ответить
@CaelestsFilius
@CaelestsFilius - 24.03.2023 20:24

Why can't you do it as replace(lastname, '-%',' ') ?
Is there a reason you can't use the wild card?

Ответить
@allahverdibalamemmedov-jl4uv
@allahverdibalamemmedov-jl4uv - 23.03.2023 11:42

amazing tutorials

Ответить