I really cannot believe that these videos are from 9 years ago. The quality of them is so high, both the teaching and video/audio wise. Thank you for them!!
0:57 what are scalar functions 3:22 create a new function 4:53 defining a function 7:08 Adding code to a function 9:27 Checking and testing a function 12:32 Modifying a Function 16:41 complex expressions 18:44 Using variables and if statements
Thank you for the video! It is very helpful! At 11:30, this video mentioned Schema, and I was wondering whether or not it was covered in greater details in other videos? Thanks!!
Re use ain't called cheating! Its all about not reinventing the wheel , and saving time, TIME is something you can't buy, store.. Just keep spending it Copy Paste it part of the job... not called cheating :D
Brilliant, just simply brilliant. Now Do you have a set of videos for data analytics such as R, SAS etc. If no, could you provide some useful links or websites?
Is there a way to automatically convert code like 'GO', 'USE' and 'CREATE' in uppercase? Either from the options within sql-server or with some simple code? Thanks!
Please correct me if I'm wrong but the variable answer seems to be redundant here. Could you have achieved this with the following? IF @SpacePosition = 0 RETUN @FullName ELSE RETURN @LEFT(FullName, @SpacePosition - 1) Thanks.
Hi! While you can do this in some other languages, you can't do it in t-sql. The final statement in a scalar-valued function must be a RETURN statement - nesting a RETURN statement in a control flow statement such as IF breaks that rule. you could do it this way: return iif( charindex(' ', @FullName) = 0 ,@FullName ,left( @FullName ,charindex(' ', @FullName) ) )
Hi Jonathan, you can certainly create functions in MySQL although there are a few syntax differences compared to SQL Server. Here's the documentation for the MySQL Create Function statement dev.mysql.com/doc/refman/8.0/en/create-procedure.html I haven't spent much time with MySQL so I'm afraid that I can't offer much more advice!
@@jonathanjordan21 Hi Jonathan, I believe the name of the application is MySQL Workbench, not Benchmark. But I would just search for "mysql create function", there are hundreds of videos on the topic. I hope that helps!
@@WiseOwlTutorials i think its because MySQL server doesnt support function to return table. thats why my code doesnt work maybe i should use microsoft DBMS instead
@@jonathanjordan21 Hi Jonathan, I assumed that you were creating a scalar function as that is the subject of this video. Yes you're correct that MySQL doesn't support table-valued functions. Using Microsoft SQL Server would be one option to allow you to do this.
Hi Andrew, I keep getting the following error when I called my scalar function in a different query. Msg 4121, Level 16, State 1, Line 1 Cannot find either column "dbo" or the user-defined function or aggregate "dbo.DateG2J", or the name is ambiguous Here is the statement where I called the function. select [dbo].[DateG2J](sddrqj,101) from testdta.f4211; I refresh the local cache, no luck. What do you think is going on? Thanks Abner
this is the most complete tutorial i've seen in my life
Thanks Valentin!
I really cannot believe that these videos are from 9 years ago. The quality of them is so high, both the teaching and video/audio wise. Thank you for them!!
Thanks very much! Happy to hear that people are still finding them useful, thanks for watching and taking the time to comment!
0:57 what are scalar functions
3:22 create a new function
4:53 defining a function
7:08 Adding code to a function
9:27 Checking and testing a function
12:32 Modifying a Function
16:41 complex expressions
18:44 Using variables and if statements
thanks!
B R A A F
I seriously owe you so much. I have improved my skills in VBA and SQL thanks to you and helped me at my career. YOU ROCK!!!!!!!!!!!!!!!!
Always a pleasure to go back and see how good these series are!! TY Andrew, wot is the best!
Thank you Hadi, always nice to hear from a long-time viewer!
Thank you!!! Refreshing to watch. Came here after not understanding several videos. Thanks again.
Excellent series of tutorials on T-SQL Stored procedures and programming. Thank you!!!
Superb! Hats Off to you, very nice and beautiful explanation in this tutorials, and thank you for sharing the database scripts too
You're very welcome, thanks for watching!
This is superb. Clear and clean explanation
Thanks, glad you found it useful!
Its just the right kind of content in the video for all the beginners.Clean and simple.
This series has been very helpful. Thanks a lot for doing these!
Brilliant! Straight to the point and very well explained! Keep up the good work!
Thank you for the video! It is very helpful! At 11:30, this video mentioned Schema, and I was wondering whether or not it was covered in greater details in other videos? Thanks!!
Hi! Part 4 of this playlist may help you ruclips.net/p/PLNIs-AWhQzcl9QXUSb0GRTxa2XlTHqDE8
Thank you andrew gould, so easy to pick whatever the sql background the person possess
This evening i have created my very first function thanks to you :3
Andrew you are my favorite teacher i am student of all the class you have in udemy. How you illustrate is priceless. i like your teaching style.
What courses does he have on udemy?
Thank you sir for your great work and i hope you continue making useful content !
Really a great tutorial. You captured some good, common scenarios. Thank you.
Thank you it was very useful and easy to follow.
Thank you Andrew, your videos helped me alot!
3:02 you need to use small letters for days and year to work accurately, "dd MM yy" month has to be capital
Thank you so much for your video! It helps me a lot!!!
Re use ain't called cheating! Its all about not reinventing the wheel , and saving time, TIME is something you can't buy, store.. Just keep spending it
Copy Paste it part of the job... not called cheating :D
Very helpful videos. Thanks a lot!
I really enjoyed this video. Thanks a bunch
Thanks a LOT.
Sir, could you please make a Video on CTEs. Why use CTEs ???
Thanks again.
Brilliant, just simply brilliant. Now Do you have a set of videos for data analytics such as R, SAS etc. If no, could you provide some useful links or websites?
Thanks for the update, do when can we expect R tutorials online like SQL. I learnt VBA, SQL from u and solely depend on your videos.
Also any plans on python ? And if so when?
Is there a way to automatically convert code like 'GO', 'USE' and 'CREATE' in uppercase? Either from the options within sql-server or with some simple code?
Thanks!
Still helping ppl in 2020!
Please correct me if I'm wrong but the variable answer seems to be redundant here. Could you have achieved this with the following?
IF @SpacePosition = 0
RETUN @FullName
ELSE
RETURN @LEFT(FullName, @SpacePosition - 1)
Thanks.
Hi! While you can do this in some other languages, you can't do it in t-sql. The final statement in a scalar-valued function must be a RETURN statement - nesting a RETURN statement in a control flow statement such as IF breaks that rule. you could do it this way:
return iif(
charindex(' ', @FullName) = 0
,@FullName
,left(
@FullName
,charindex(' ', @FullName)
)
)
@@WiseOwlTutorials Thank you. Certainly helps.
@@BijouBakson Thanks!
sir, is this only works for Microsoft DMBS?
bcs i cannot use it for MYSQL Benchmark
Hi Jonathan, you can certainly create functions in MySQL although there are a few syntax differences compared to SQL Server. Here's the documentation for the MySQL Create Function statement dev.mysql.com/doc/refman/8.0/en/create-procedure.html
I haven't spent much time with MySQL so I'm afraid that I can't offer much more advice!
@@WiseOwlTutorials thanks sir.
ive search on yt, but none came up with MySQL Benchmark
@@jonathanjordan21 Hi Jonathan, I believe the name of the application is MySQL Workbench, not Benchmark. But I would just search for "mysql create function", there are hundreds of videos on the topic.
I hope that helps!
@@WiseOwlTutorials i think its because MySQL server doesnt support function to return table. thats why my code doesnt work
maybe i should use microsoft DBMS instead
@@jonathanjordan21 Hi Jonathan, I assumed that you were creating a scalar function as that is the subject of this video. Yes you're correct that MySQL doesn't support table-valued functions. Using Microsoft SQL Server would be one option to allow you to do this.
Excellent video!
Hi Andrew,
I keep getting the following error when I called my scalar function in a different query.
Msg 4121, Level 16, State 1, Line 1
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.DateG2J", or the name is ambiguous
Here is the statement where I called the function.
select [dbo].[DateG2J](sddrqj,101) from testdta.f4211;
I refresh the local cache, no luck.
What do you think is going on?
Thanks
Abner
Hi! How can I find system functions. Actually I want to copy a function from 2016 to 2012. Function name is String_spilt()
I mean the code
Thanks but I am using 2012 and i want result in rows that is not having fix length
is everything still relevant today? are there any changes>
You sound like Little finger of Game of Thrones sometimes....(2:50 - 2:55) :p
No Offence :) , Excellent series , Thanks for your Help .
This was very helpful :)
Great videos. Cheers!
I couldn't quite understand the difference between" Functions " and " Procedures "
May someone explain It to me, please.
Very well explained ..
That helps, thanks for the great video's btw!
Thank you very much !!!
what's with the sound?
I'm only hearing wispers. Must be something wrong on my side, although it isn't happening with other videos.
great help!thanks
Thank you man !!
Coming from someone just learning SQL, I find the "extras" on the screen to a bit distracting. Just show what we need to see, not everything else.
+Collin Wright Other than that, very good video.
functions, flash card style..
Excellent videos! Thanks so much!
You're very welcome, thanks for watching!