Brilliant, this is exactly what I wanted to do. I can never remember the syntax myself.
@malisengjabum5959
4 жыл бұрын
The way you explain and write the query is Very Good. You are a great teacher. Thanks.
@ciruzzi7
4 жыл бұрын
It's hard for me to find videos that are clear and understandable. As a beginner with SQL, this was spot-on. I will definitely look for more videos from you...and btw luv the accent!
@BeardedDevData
4 жыл бұрын
That’s great, thanks for the feedback, let me know if there are any areas you would like me to do tutorials on.
@ciruzzi7
4 жыл бұрын
@@BeardedDevData how about SSRS reports?
@stealthassulter
4 жыл бұрын
Excellent JOB buddy. Thank you for your time.
@hemantbhatt1486
3 жыл бұрын
Good explanation
@mmusciano
3 жыл бұрын
Thank you very much
@mostinho7
3 жыл бұрын
9:45 done
@doktoren99
4 жыл бұрын
Sick video!
@harrydadson7467
4 жыл бұрын
This is very good playlist, Thank you very much...only criticism I have is I wished it was is chronological order :)
@BeardedDevData
4 жыл бұрын
I appreciate that, I do need to sort out the playlists.
@enjaku2600
5 жыл бұрын
Thanks mate. Very clear and useful. Much appreciated. -eric
@BeardedDevData
5 жыл бұрын
No problem, glad you found the video useful.
@alexkoh4045
4 жыл бұрын
THANK YOU SO MUCH
@WizOWash
4 жыл бұрын
Thanks so much for this tutorial! Excellently done. I did have a question about the line you added for the CustomerID when you set the Gender value to Unknown. How does SQL know to set the Gender value to NULL. From the statement WHEN CustomerID = 5995 THEN 'Uknown'. It does not reference the Gender field at all in that line. Thanks
@BeardedDevData
4 жыл бұрын
I am effectively overwriting the Gender column within the SELECT, as you can see in the CASE statement, “END AS Gender”, I don’t need to actually reference the column to set a value.
@AZ_German
2 жыл бұрын
Had the same question. Thanks for asking.
@azzamf.khayyat8072
3 жыл бұрын
Thanks for making the video. What application do u recommend for writing queries in mobile? --WHERE mobile IN ( 'apple' , 'android' );
@BeardedDevData
3 жыл бұрын
To be honest I have never tried to run queries on a mobile platform, I can see the benefit from a training point of view but don't think it would be useful in production, I would be curious to know if you find a way to do it though.
@vru5696
2 жыл бұрын
how to write case statements in where clause to check dates with between logic. for eg. startdate between table1.startdate and table2.enddate
@BeardedDevData
2 жыл бұрын
You can just use WHERE startdate BETWEEN table1.startdate AND table2.enddate, there is no need for a case statement
@vru5696
2 жыл бұрын
@@BeardedDevData actually based on nulls record in date need to use case
@somalipirates
5 жыл бұрын
AMAZING. thank you.. keep them coming
@useless3905
3 жыл бұрын
Thanks sir can you do this with if else statement?
@BeardedDevData
3 жыл бұрын
An IF ELSE statement is used to control logic, you can use an IIF function to replace simple CASE statements, the main difference is that with IIF you can return one of two value but with CASE statements you can return one of many values.
@sairam8406
4 жыл бұрын
thumb's up
@siddhipore1715
3 жыл бұрын
How to write a case statment to reject those records which has null values in gender column?
@BeardedDevData
3 жыл бұрын
You wouldn't want to use a case statement in this scenario, instead use WHERE gender IS NOT NULL, this will filter NULLs in the gender column. If you want to change what is returned then use a case statement CASE WHEN gender IS NULL THEN 'Unknown' END, case statements will not apply filtering.
@siddhipore1715
3 жыл бұрын
@@BeardedDevData thanks for the reply
@QloweeD
5 жыл бұрын
Hi, can you help me right up a case when statement for the example below, Say case when count is 4 then a=20 and rest of variables in the group (b,c,d) = 10. I want the statement to assign 20 to "a" and assign 10 to each of the remaining variable.
@BeardedDevData
5 жыл бұрын
Can you give me more details, it sounds like you are initially aggregating the values?
@leticialima7123
4 жыл бұрын
Hi, Can you submit an the test database to we ?
@ondaride777
2 жыл бұрын
For genders using multiples instead of just 2 makes it even more clear and politically correct lol
@AlishSafarli
5 жыл бұрын
All the case statements I have seen are about gender column lol set 'm' to 'something' is there another advanced query you can show ?
@BeardedDevData
5 жыл бұрын
Sure, you are right the examples are quite straight forward and case statements are quite an interesting topic. I will put some videos up showing applying ranges using multiple conditions, using built in functions inside case statements and building a dynamic where clause with case statements.
@AlishSafarli
5 жыл бұрын
BeardedDev that would be great bro! What is your programming level?senior?
@Gigatless
4 жыл бұрын
One can only imagine how many sjw were triggered by this tutorial
Пікірлер: 38