SQL Server Programming Part 7 - User Defined Functions

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

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

  • @valentinnica6034
    @valentinnica6034 2 года назад +2

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

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

  • @LaialiSafa
    @LaialiSafa 8 лет назад +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

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

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

  • @zaheershaikh6834
    @zaheershaikh6834 7 месяцев назад +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

  • @autogeeks8075
    @autogeeks8075 8 лет назад

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

  • @keinlanz
    @keinlanz 10 лет назад +5

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

  • @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 ruclips.net/p/PLNIs-AWhQzcl9QXUSb0GRTxa2XlTHqDE8

  • @almightyknight127
    @almightyknight127 9 лет назад

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

  • @chrisbroughton6
    @chrisbroughton6 11 лет назад +2

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

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

  • @mohamed-fatta
    @mohamed-fatta 5 лет назад +1

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

  • @MC__
    @MC__ 10 лет назад

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

  • @makdawoldeselassie9360
    @makdawoldeselassie9360 8 лет назад

    Thank you it was very useful and easy to follow.

  • @shakhnozasalamova302
    @shakhnozasalamova302 10 лет назад

    Thank you Andrew, your videos helped me alot!

  • @xxxx-kv9ei
    @xxxx-kv9ei 6 лет назад

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

  • @barbaraulitsky9055
    @barbaraulitsky9055 6 лет назад

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

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

  • @gtsichritzis
    @gtsichritzis 8 лет назад

    Very helpful videos. Thanks a lot!

  • @krismaly
    @krismaly 11 лет назад

    I really enjoyed this video. Thanks a bunch

  • @Wisdom909
    @Wisdom909 11 лет назад

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

  • @gurupranesh4594
    @gurupranesh4594 8 лет назад

    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 8 лет назад

      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 8 лет назад

      Also any plans on python ? And if so when?

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

  • @haroldaltamirano3958
    @haroldaltamirano3958 4 года назад

    Still helping ppl in 2020!

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

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

  • @sureshmaharjan511
    @sureshmaharjan511 10 лет назад

    Excellent video!

  • @Dada-ig
    @Dada-ig 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

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

  • @Sgoose105
    @Sgoose105 Год назад

    is everything still relevant today? are there any changes>

  • @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 :)

  • @MrStephen0625
    @MrStephen0625 8 лет назад

    Great videos. Cheers!

  • @punchline1729
    @punchline1729 2 года назад

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

  • @Youngvijay212
    @Youngvijay212 11 лет назад

    Very well explained ..

  • @sftw009
    @sftw009 11 лет назад

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

  • @danman7484
    @danman7484 5 лет назад

    Thank you very much !!!

  • @osadchan
    @osadchan 11 лет назад

    what's with the sound?

  • @osadchan
    @osadchan 11 лет назад

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

  • @aandy143
    @aandy143 7 лет назад

    great help!thanks

  • @AE-jo9dr
    @AE-jo9dr 10 лет назад

    Thank you man !!

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

  • @chrisbell7646
    @chrisbell7646 6 лет назад

    functions, flash card style..

  • @QuietLumina
    @QuietLumina Год назад +1

    Excellent videos! Thanks so much!