Mathematical functions in sql server Part 29

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

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

  • @wasimbader9170
    @wasimbader9170 8 лет назад +15

    back again to revise all 135 tutorials. Great work done by you and now i can understand better than b4. getting there. thumbs up

  • @chennaranjith2636
    @chennaranjith2636 4 года назад +7

    I am expecting the MSBI tutorial as well from you, because the way you teaches is a lot of worth. I hope and could you please do it for us. Thanks in advance :-)

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

    thank you so much for providing this much value
    so far I've watched 30 videos of this channel about SQL server and they've all been very useful and informative
    your style of teaching is excellent

  • @justinli19901027
    @justinli19901027 8 лет назад +10

    this man is THE MAN!

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  8 лет назад +1

      Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful.
      I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
      ruclips.net/user/kudvenkatplaylists?view=1&sort=dd
      If you need DVDs or to download all the videos for offline viewing please visit
      www.pragimtech.com/kudvenkat_dvd.aspx
      Slides and Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel.
      ruclips.net/video/y780MwhY70s/видео.html
      If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
      ruclips.net/user/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video.
      May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
      Good Luck
      Venkat

  • @JaswantSingh-go8ey
    @JaswantSingh-go8ey 4 года назад +1

    Very...important videos

  • @shahzaibriaz6552
    @shahzaibriaz6552 6 лет назад +7

    kudvenkat sir
    Round Function explanation is not clear.....

  • @malharjajoo7393
    @malharjajoo7393 8 лет назад +1

    It think it is really important to tell that these functions may return a number or a set of records ( this makes a big difference in the query/code )

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

    @kudvenkat hello Mr. Venkat, please could you make a tutorial on Hierarchy functions.

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

    Hi Venkat,
    The videos you have posted are really useful. I would appreciate if you could add for case statement as well.
    Thanks,
    Smita

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

    Hi Venkat,
    The videos you have posted are really useful.can u post video on arithmetic operators
    thank you

  • @aakashagrawal7361
    @aakashagrawal7361 10 лет назад +2

    Hi Sir,
    In the above video Floor(Rand() *100), can not guarantee that It will be different right? .. for eg. if rand is 0.111343 and .111325, then floor will give the same value..

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

      no, each time it will give u different value, because , as u multiply the random value with 100 , the value is alws different just because u r multiplying it with different value each time

    • @sushilsalins3576
      @sushilsalins3576 9 лет назад +1

      Aakash Agrawal Random doesnt mean it will give you different numbers everytime. the numbers may or may not be the same. everything is random

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

      +Aakash Agrawal There are different algorithms for generating random nos and they generate random no upto some point but the nos may repeat after certain point depending upon the algorithm used. Different algorithms are used in different applications.For more details check this pdf
      www.mathworks.com/moler/random.pdf

    • @artokilponen6989
      @artokilponen6989 7 лет назад +1

      Another thing to see from randoms is that the number of options is still limited. For example, take a real world random: Flip coin three times. Random? Yes. Duplicate results? Has to be. You can get first heads, then tails and then no matter what the result is, you'll get a duplicate result.

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

    U have a error in you notes. Ceiling returns the highest and floor the lowest not the inverse as u wrote

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

    Hi sir thanks for this video
    but as i am seeing our initial value is 1 then why in any 10 numbers 0 is coming in this video

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

    This is the very awesome channel and I am watching each and everyone videos
    But I am getting an error on below query
    SELECT ROUND(987.649,-2)
    "Msg 8115, Level 16, State 2, Line 1436
    Arithmetic overflow error converting expression to data type numeric."
    Please help me how we can get resolve this issue............Thanks

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

    very very nice...

  • @jsobiranski
    @jsobiranski 10 лет назад +6

    The Rand() function returns a pseudo-random float value ,x, from 0 through 1, exclusive. This means that Rand() returns a value as follows: 0

    • @krzysztofs8535
      @krzysztofs8535 7 лет назад +1

      Yes, that's true :-) But still the best videos on the net from SQL Server. Thank U Venkat!

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

    i run the following code:
    declare @counter INT
    set @counter = 1
    while (@counter>=10)
    begin
    print floor(rand(1)*100)
    set @counter=@counter+1
    end
    it does not print the numbers and says Commands completed successfully. whats the reason?

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

    THUMBS UP!!!!

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

    Where can I find tutorial that covers real world down to earth scenarios like convert varchar to a number/decimal then multiply that number by a number in another table. I've been in banking for 25 years and never had an occasion where I needed to take the power of or round numbers up or do any of the stuff that I'm seeing in these tutorials. In the real world we need to add columns divide columns multiply columns. I can't find common Sense basic SQL tutorials that show how to do basic math between columns in different tables.

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

    at 15.2 ,how we get 900 for round(850.556,-2),it should be 800,right ?

  • @sureshrajput5794
    @sureshrajput5794 9 лет назад +3

    sir i didn't understood round() function :/

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

      If you still don't understand it, could you provide an example? Like, what parameters you passed, what you got as the result and what did you expect as the result.

    • @tareqbk1870
      @tareqbk1870 3 года назад

      @@artokilponen6989 i didnt understand the last example of round function with those negative parameters
      maybe ill watch the video again

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

    what if the truncate parameter is 7. how does it differ if i input truncate parameter to 2 or 1

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

      Try to execute this and tell if it still is unclear to you:
      select round(12.3456789, 1)
      select round(12.3456789, 2)
      select round(12.3456789, 7)

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

    8:48 I got the exact Random numbers ..

  • @philzmw6124
    @philzmw6124 3 года назад

    @2:07 ceiling is in the top and roof is on the floor 😂😂😂 day made as i Learn

  • @VikashKumar-js7id
    @VikashKumar-js7id 6 лет назад

    how can in find a Random number from given number in Sql like this Random(1,2,33,5,45)

    • @Lucy-pb4eh
      @Lucy-pb4eh 5 лет назад

      You can give ID for your numbers and randomize on the IDs instead of the actual numbers.

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

    select RAND()
    Select RAND(1)
    SELECT RAND(2)
    whn i try this
    i must get RAND() : to be changing for number of time i run it and for RAND(1) And RAND(2) i must get contant value
    but i m getting constant value for all three
    kudvenkat

  • @stutitehri993
    @stutitehri993 10 лет назад +2

    important functions

  • @artokilponen6989
    @artokilponen6989 7 лет назад +1

    Could someone give me a practical example of using a rand with seed value instead of just a normal non-random number?

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

    how it has became to 900.00 i didn't get u can u explain me clearly

    • @artokilponen6989
      @artokilponen6989 7 лет назад +1

      If you round with 1, you get 1 decimal i.e. tenths. If you round with 0, you get 0 decimals i.e. integer. If you round with -1, you get "-1 decimal" which is tens. If you round with -2, you get "-2 decimals" i.e. hundreds. You round 850.556 to the closest hundred, you get 900.
      Let's take "a real world" example: You want to buy a house that costs $153259.76. When you say aloud in a spoken language what it costs, you say probably that it costs $153k. What did you just do? Rounded it to -3 decimals i.e. to thousands.
      Try to execute this to see how the number "lives":
      select round(123.456789, -2)
      select round(123.456789, -1)
      select round(123.456789, 0)
      select round(123.456789, 1)
      select round(123.456789, 2)
      select round(123.456789, 3)

  • @Lnk-xh7ln
    @Lnk-xh7ln 4 года назад +1

    ceiling is on the top and roof is on the floor? wHAT?!

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

    none of those round it to 851.000 which i think would be the most logical example to show since its the next whole number. if you round the "XX0.XXX" it rounds it to XX0.XXX if you round the "XXX.5XX" it rounds it to XXX.6XX ...... will anything round it to 851?
    legally, 850.556 should round to 851