SQL Server Programming Part 7 - User Defined Functions

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 72

  • @ttoastedtoast
    @ttoastedtoast 2 роки тому +3

    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!!

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 роки тому +1

      Thanks very much! Happy to hear that people are still finding them useful, thanks for watching and taking the time to comment!

  • @valentinnica6034
    @valentinnica6034 2 роки тому +2

    this is the most complete tutorial i've seen in my life

  • @svendiamond
    @svendiamond 5 років тому +1

    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!!!!!!!!!!!!!!!!

  • @LaialiSafa
    @LaialiSafa 7 років тому +21

    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

  • @hadibq
    @hadibq Рік тому +1

    Always a pleasure to go back and see how good these series are!! TY Andrew, wot is the best!

    • @WiseOwlTutorials
      @WiseOwlTutorials  Рік тому

      Thank you Hadi, always nice to hear from a long-time viewer!

  • @PuniKM
    @PuniKM 4 роки тому

    Thank you!!! Refreshing to watch. Came here after not understanding several videos. Thanks again.

  • @JaswantSingh-di8nu
    @JaswantSingh-di8nu 7 років тому

    Excellent series of tutorials on T-SQL Stored procedures and programming. Thank you!!!

  • @autogeeks8075
    @autogeeks8075 8 років тому

    Its just the right kind of content in the video for all the beginners.Clean and simple.

  • @zaheershaikh6834
    @zaheershaikh6834 5 місяців тому +1

    Superb! Hats Off to you, very nice and beautiful explanation in this tutorials, and thank you for sharing the database scripts too

  • @rajkumarrajan8059
    @rajkumarrajan8059 Рік тому +1

    This is superb. Clear and clean explanation

  • @almightyknight127
    @almightyknight127 8 років тому

    Thank you andrew gould, so easy to pick whatever the sql background the person possess

  • @keinlanz
    @keinlanz 10 років тому +5

    This series has been very helpful. Thanks a lot for doing these!

  • @adanlakia7729
    @adanlakia7729 6 років тому

    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.

    • @uiqbal10
      @uiqbal10 4 роки тому

      What courses does he have on udemy?

  • @chrisbroughton6
    @chrisbroughton6 11 років тому +2

    This evening i have created my very first function thanks to you :3

  • @CarlosMoreno-iq5ly
    @CarlosMoreno-iq5ly 5 років тому

    Brilliant! Straight to the point and very well explained! Keep up the good work!

  • @OrangeBossa
    @OrangeBossa Рік тому +1

    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!!

    • @WiseOwlTutorials
      @WiseOwlTutorials  Рік тому

      Hi! Part 4 of this playlist may help you ua-cam.com/play/PLNIs-AWhQzcl9QXUSb0GRTxa2XlTHqDE8.html

  • @MC__
    @MC__ 10 років тому

    Really a great tutorial. You captured some good, common scenarios. Thank you.

  • @mohamed-fatta
    @mohamed-fatta 5 років тому +1

    Thank you sir for your great work and i hope you continue making useful content !

  • @makdawoldeselassie9360
    @makdawoldeselassie9360 8 років тому

    Thank you it was very useful and easy to follow.

  • @umeirdestination
    @umeirdestination 8 років тому

    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

  • @haroldaltamirano3958
    @haroldaltamirano3958 4 роки тому

    Still helping ppl in 2020!

  • @shakhnozasalamova302
    @shakhnozasalamova302 9 років тому

    Thank you Andrew, your videos helped me alot!

  • @barbaraulitsky9055
    @barbaraulitsky9055 6 років тому

    Thank you so much for your video! It helps me a lot!!!

  • @gurupranesh4594
    @gurupranesh4594 7 років тому

    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?

    • @gurupranesh4594
      @gurupranesh4594 7 років тому

      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.

    • @gurupranesh4594
      @gurupranesh4594 7 років тому

      Also any plans on python ? And if so when?

  • @xxxx-kv9ei
    @xxxx-kv9ei 5 років тому

    3:02 you need to use small letters for days and year to work accurately, "dd MM yy" month has to be capital

  • @sureshmaharjan511
    @sureshmaharjan511 10 років тому

    Excellent video!

  • @gtsichritzis
    @gtsichritzis 8 років тому

    Very helpful videos. Thanks a lot!

  • @Wisdom909
    @Wisdom909 11 років тому

    Thanks a LOT.
    Sir, could you please make a Video on CTEs. Why use CTEs ???
    Thanks again.

  • @krismaly
    @krismaly 11 років тому

    I really enjoyed this video. Thanks a bunch

  • @danman7484
    @danman7484 5 років тому

    Thank you very much !!!

  • @Youngvijay212
    @Youngvijay212 11 років тому

    Very well explained ..

  • @MrStephen0625
    @MrStephen0625 8 років тому

    Great videos. Cheers!

  • @aandy143
    @aandy143 7 років тому

    great help!thanks

  • @AE-jo9dr
    @AE-jo9dr 10 років тому

    Thank you man !!

  • @karan_2892
    @karan_2892 7 років тому

    You sound like Little finger of Game of Thrones sometimes....(2:50 - 2:55) :p
    No Offence :) , Excellent series , Thanks for your Help .

  • @avishkaariyaratne1377
    @avishkaariyaratne1377 6 років тому

    This was very helpful :)

  • @abnerbaptiste8278
    @abnerbaptiste8278 8 років тому

    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

  • @sftw009
    @sftw009 11 років тому

    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!

  • @sftw009
    @sftw009 11 років тому

    That helps, thanks for the great video's btw!

  • @BijouBakson
    @BijouBakson 3 роки тому

    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.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 роки тому +1

      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)
      )
      )

    • @BijouBakson
      @BijouBakson 3 роки тому +2

      @@WiseOwlTutorials Thank you. Certainly helps.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 роки тому +1

      @@BijouBakson Thanks!

  • @Sgoose105
    @Sgoose105 Рік тому

    is everything still relevant today? are there any changes>

  • @jonathanjordan21
    @jonathanjordan21 3 роки тому

    sir, is this only works for Microsoft DMBS?
    bcs i cannot use it for MYSQL Benchmark

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 роки тому +1

      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
      @jonathanjordan21 3 роки тому +1

      ​@@WiseOwlTutorials thanks sir.
      ive search on yt, but none came up with MySQL Benchmark

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 роки тому +1

      @@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!

    • @jonathanjordan21
      @jonathanjordan21 3 роки тому +1

      @@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

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 роки тому

      @@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.

  • @osadchan
    @osadchan 11 років тому

    I'm only hearing wispers. Must be something wrong on my side, although it isn't happening with other videos.

  • @AamirKhan-og8kv
    @AamirKhan-og8kv 8 років тому

    Hi! How can I find system functions. Actually I want to copy a function from 2016 to 2012. Function name is String_spilt()

    • @AamirKhan-og8kv
      @AamirKhan-og8kv 8 років тому

      I mean the code

    • @AamirKhan-og8kv
      @AamirKhan-og8kv 8 років тому

      Thanks but I am using 2012 and i want result in rows that is not having fix length

  • @osadchan
    @osadchan 11 років тому

    what's with the sound?

  • @punchline1729
    @punchline1729 2 роки тому

    I couldn't quite understand the difference between" Functions " and " Procedures "
    May someone explain It to me, please.

  • @chrisbell7646
    @chrisbell7646 6 років тому

    functions, flash card style..

  • @collinwright6127
    @collinwright6127 8 років тому

    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.

    • @collinwright6127
      @collinwright6127 8 років тому

      +Collin Wright Other than that, very good video.

  • @QuietLumina
    @QuietLumina Рік тому +1

    Excellent videos! Thanks so much!