How to create an Azure SQL Database
21:16
SQL Basics - Ordering
25:47
3 жыл бұрын
What are Dirty Reads in SQL Server?
9:09
Пікірлер
@pallabmahapatraMTechCS
@pallabmahapatraMTechCS 6 күн бұрын
does it works in mysql ? delimiter $$ create procedure fillDataPersons(in LastName varchar(50) = "Tom",FirstName varchar(50) = "Jerry",in Address varchar(50), in City varchar(50)) Begin insert into Persons (FirstName,LastName,Address,City) values(LastName,FirstName,Address,City); End $$ Delimiter ; showing error what is the solution of mysql?
@poojasingh2052
@poojasingh2052 8 күн бұрын
Why checksum and hashbytes are showing as invalid identifier in sql developer
@ahmadjerjees428
@ahmadjerjees428 10 күн бұрын
Thanks a lot for the great explanation man!
@jamesscott5998
@jamesscott5998 Ай бұрын
Greate examples
@StòrDàta_C
@StòrDàta_C Ай бұрын
May I say a big thank you for these videos. They have been invaluable.
@BeardedDevData
@BeardedDevData Ай бұрын
Glad you like them!
@williamdela8894
@williamdela8894 Ай бұрын
where do we get the sales datasets to the video
@BeardedDevData
@BeardedDevData Ай бұрын
Hi, unfortunately they aren't accessible any more, but I have done another video that allows you to follow along, kzbin.info/www/bejne/onPGdYapnNVjiLc
@source-454
@source-454 2 ай бұрын
very nice thanks u very much
@darrylw99
@darrylw99 2 ай бұрын
Not much use if you need to know the columns. you surely need to get distinct values before you pivot. so its not dynamic
@BeardedDevData
@BeardedDevData 2 ай бұрын
Appreciate that, that's why I have separate videos on dynamic pivoting. You will find though even writing a basic query you will need to know the data.
@darrylw99
@darrylw99 2 ай бұрын
It wasnt a comment about your video. it was a comment about pivot itself..... thank you for the reply
@DB-ml4ew
@DB-ml4ew 2 ай бұрын
Hi BeardedDev, Many thanks for this video. It's my first one, I'm only starting with Azure multiverse - via your videos. I see some difference in the functions available nowadays, I guess they have changed in the last couple of years... Most of it is not so important, of course. However, I did get desperately stuck at the step of authentication when connecting to SQL server on my SSMS [Error 18456]. After trying all possible trouble-shooting hints all over the internet, I (purely accidentally) discovered that my authentication method shuld be 'Entra MFI'. I was logged into my Azure account with my usual Microsoft account credentials...probably for that reason [how bad is this idea, btw?]. As far, as I understand, this whole Entra thing is new and slightly differs from the previous options. This might be worse some update on this video in the future or might be just useful info for some other viewers. 🙃 Once I overcame my authentication challenge, the rest went very smoothely - cause your video is really good! Thank you!!!
@BeardedDevData
@BeardedDevData 2 ай бұрын
Hi, a lot does change now at rapid pace in the cloud, UIs can change quite frequently. Entra used to be Active Directory, that's always best practice, the reason I use SQL Server Authentication which is still supported is because I'm working on a personal subscription, I don't have Entra setup but great call its something I should call out. Great work on starting with Azure, it's lots of fun.
@maulishriagrawal1875
@maulishriagrawal1875 2 ай бұрын
Can Null be removed from the output value. i have currently hardcoded IsNull along with cols name. Can we make dynamic query including IsNull??
@BeardedDevData
@BeardedDevData 2 ай бұрын
I think it could work, you can't remove NULLs though, only replace.
@1622roma
@1622roma 2 ай бұрын
Wow, thank you so much!
@BeardedDevData
@BeardedDevData 2 ай бұрын
You're welcome!
@Shaolin80000
@Shaolin80000 3 ай бұрын
This is much better than information_schema
@wicked_cool7
@wicked_cool7 3 ай бұрын
This was easy to understand. Thank you.
@RustyFLL
@RustyFLL 3 ай бұрын
TY! Solved my problem. well done.
@MrZRealtor
@MrZRealtor 3 ай бұрын
Excellent explaination and presentation! Thank you BeardedDev!!
@jashneaaftabi
@jashneaaftabi 4 ай бұрын
Wao just wao it's super simple easy thanks man.
@BitPiBit
@BitPiBit 4 ай бұрын
Thank you
@chrisosomo2856
@chrisosomo2856 4 ай бұрын
I really appreciate the amount of effort you put into this tutorial. Your hard work is not lost on me. Your explanation are clear and examples are easy to follow along with. Thanks again and God bless🙏🏽🙏🏽
@BeardedDevData
@BeardedDevData 4 ай бұрын
Thanks so much.
@revathisubhasht
@revathisubhasht 4 ай бұрын
Finally, I understood the window functions easily...Thanks alot
@BeardedDevData
@BeardedDevData 4 ай бұрын
Glad I could help.
@eric-seastrand
@eric-seastrand 5 ай бұрын
This solution breaks down if there are not any sales for a day: it would grab sales from a neighboring day instead of counting the missing day as zero. How would you normalize the time series data to account for that?
@BeardedDevData
@BeardedDevData 5 ай бұрын
The solution here is about running totals or averages rather than replacing values. Let's say we start our data on 01/01/2024 and sales were 0, on 02/01/2024 sales were 100. If we have a running total on 02/01/2024 it would be 100 taking into account the previous days sales of 0 and the current days of 100. We might want to do this if say we work for a company that has peaks of sales on weekends, we might want a rolling total of the last 7 days rather than peaks every weekend. All we have really done is change the scope of the dates considered in that particular column, this is easily communicated through column names such as rolling7daytotal. We can also add a description if we use a tool to output the data that allows us to, hopefully that helps.
@pravingaddam8541
@pravingaddam8541 5 ай бұрын
If my table contains customer details having birthdate with other information Then my requirement is that I need birth date wise data (consider only 1 month in this case) with birthdate count column as Total Like Below Column name :--- '2013-03-01' having value 4 (4 is count of customer w.r.t. birthdate) '2013-03-02' having value 3 '2013-03-03' having value 5 Remaining column name :- '2013-03-04' to '2013-03-31' having value 0 or null Last column name :- birthdate_count=3 having count as per above (because three columns have value greater than 0 and remaining have 0 value)
@BeardedDevData
@BeardedDevData 5 ай бұрын
This sounds more of a simple aggregation, first you'd need to manipulate the birthdate to get a consistent date for each month then group by it with a count.
@pravingaddam8541
@pravingaddam8541 5 ай бұрын
Hi
@pravingaddam8541
@pravingaddam8541 5 ай бұрын
​@@BeardedDevData CREATE TABLE yourtable ([role] varchar(17), [familyname] varchar(8), [givenname] varchar(5), [skill] int, [level] varchar(15), [id] int, [date] datetime) ; INSERT INTO yourtable ([role], [familyname], [givenname], [skill], [level], [id], [date]) VALUES ('Vision Supervisor', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-27 00:00:00'), ('Vision Superv', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-07 00:00:00'), ('Vision Supervisor', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-27 00:00:00'), ('Vision Supervor', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-01 00:00:00') ; select date, (case when date is null then count(distinct date) else count(*) end ) daywisetotal from yourtable where date between '2013-03-01' and '2013-03-31' group by cube (date) having count(*)>0 ; => Output (this is the output what I required) date daywisetotal ----------------------- ------------ 2013-03-01 00:00:00.000 1 2013-03-07 00:00:00.000 1 2013-03-27 00:00:00.000 2 NULL 3 Need same output in pivot Like Total '2013-03-01' '2013-03-07' '2013-03-27' Row1 :- 3 1 1 2 But I am getting output in more than 1 row . Can please help me for getting same output in pivot ?
@pravingaddam8541
@pravingaddam8541 5 ай бұрын
CREATE TABLE yourtable ([role] varchar(17), [familyname] varchar(8), [givenname] varchar(5), [skill] int, [level] varchar(15), [id] int, [date] datetime) ; INSERT INTO yourtable ([role], [familyname], [givenname], [skill], [level], [id], [date]) VALUES ('Vision Supervisor', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-27 00:00:00'), ('Vision Superv', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-07 00:00:00'), ('Vision Supervisor', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-27 00:00:00'), ('Vision Supervor', 'Unsworth', 'Simon', 10, 'Telegenic Staff', 664, '2013-03-01 00:00:00') ; select date, (case when date is null then count(distinct date) else count(*) end ) daywisetotal from yourtable where date between '2013-03-01' and '2013-03-31' group by cube (date) having count(*)>0 ; => Output (this is the output what I required) date daywisetotal ----------------------- ------------ 2013-03-01 00:00:00.000 1 2013-03-07 00:00:00.000 1 2013-03-27 00:00:00.000 2 NULL 3 Need same output in pivot Like Total '2013-03-01' '2013-03-07' '2013-03-27' Row1 :- 3 1 1 2 But I am getting output in more than 1 row . Can please help me for getting same output in pivot ?
@pravingaddam8541
@pravingaddam8541 5 ай бұрын
I need some help if in your example instead of product if its date (like monthly date '2012-03-01', '2012-03-02','2012-03-03','2012-03-04', so on.. upto 2012-03-31' ) and instead of customer total column i required monthly day count with respect to day value means if march month having total 31 day in that 25 day having value greater than 0 and remaining 6 day have null or 0 value then monthly day count should be 25 So please help in this case
@BeardedDevData
@BeardedDevData 5 ай бұрын
It would depend on what you want the output to look like, it sounds like you'd need a SUM(CASE ... as a starting point.
@pravingaddam8541
@pravingaddam8541 5 ай бұрын
Very well explained ❤❤
@candyskullxoxo4660
@candyskullxoxo4660 5 ай бұрын
love it thanks
@RobBurdine
@RobBurdine 5 ай бұрын
Ditto all that. Truly the best format so a person can understand the terms as well as what is happening. As he builds the pivot table when he writes over the <words that define the functionality> you can understand what is happening. He uses terms like the spreader. Describing what is going to spread out or fan out the columns of data that will be displayed. Good job .....really good job.
@BeardedDevData
@BeardedDevData 5 ай бұрын
Thanks so much.
@wicked_cool7
@wicked_cool7 3 ай бұрын
I'm starting to think all the Microsoft documentation is written by AI xD. It's so overly complicated.
@0i0l0o
@0i0l0o 5 ай бұрын
Thank you BD
@sarvinasalohidinova4881
@sarvinasalohidinova4881 5 ай бұрын
Thanks helped a lot
@BeardedDevData
@BeardedDevData 5 ай бұрын
Glad I could help.
@saripkat
@saripkat 5 ай бұрын
Possibly the best explanation on the internet. Thank you.
@BeardedDevData
@BeardedDevData 5 ай бұрын
Thanks so much.
@KarinS-tk3qt
@KarinS-tk3qt 5 ай бұрын
Thank you!
@BeardedDevData
@BeardedDevData 5 ай бұрын
No problem.
@kfcollection3471
@kfcollection3471 6 ай бұрын
Perfect explanation
@BeardedDevData
@BeardedDevData 6 ай бұрын
Thanks so much.
@MAAMECOBBINAH
@MAAMECOBBINAH 6 ай бұрын
Thank you for such a thorough explanation
@BeardedDevData
@BeardedDevData 6 ай бұрын
Thank you for watching
@margin-fades
@margin-fades 6 ай бұрын
Understandable, clear, and concise. Thank you!
@S1nagTala
@S1nagTala 6 ай бұрын
Thanks a lot for this, I got it right on time.
@azizamusaeva7742
@azizamusaeva7742 6 ай бұрын
Hi there, I’m new to ssis and connection manager- provider shows “Native OLE DB/SQL Server Native Client RDA 11.0” and giving me failure. If you could do a video about it that would be great.
@TonnyPodiyan
@TonnyPodiyan 7 ай бұрын
Could you please share the dataset to practice along. Thanks !!
@mariatomova9379
@mariatomova9379 7 ай бұрын
Hey, that video and the explanation is absolutely great! Thanks a lot! Although everything works just fine I don’t understand why do we create the @query variable as a string :?
@BeardedDevData
@BeardedDevData 7 ай бұрын
We need to use a valid data type for our parameter, in this case we are building the query, something of variable length that contains text. NVARCHAR(MAX) is overkill in this scenario.
@sndrstpnv8419
@sndrstpnv8419 7 ай бұрын
from where to get xlxs file to try your instructions pls
@sndrstpnv8419
@sndrstpnv8419 7 ай бұрын
can you share code pls
@sndrstpnv8419
@sndrstpnv8419 7 ай бұрын
can you share code pls
@BeardedDevData
@BeardedDevData 7 ай бұрын
It's in the description.
@sndrstpnv8419
@sndrstpnv8419 7 ай бұрын
@@BeardedDevData thanks, do you have video for windows functions with code pls
@BeardedDevData
@BeardedDevData 7 ай бұрын
Sure, I have done a follow along video: kzbin.info/www/bejne/onPGdYapnNVjiLc
@subramaniyanm4814
@subramaniyanm4814 8 ай бұрын
How to find column name in proc Example goodsvalue+taxamount billamount i find the billamount in proc give the output text=goodsvalue+taxamount Any possible?
@BeardedDevData
@BeardedDevData 8 ай бұрын
You can search anything as long as its in the definition of the stored procedure but remember you are just searching text. Can just pass in the column name, can even search expressions such as goodsvalue+taxamount but this won't return any stored procedures where the expression is written as goodsvalue + taxamount. Hopefully that provides some clarity.
@subramaniyanm4814
@subramaniyanm4814 8 ай бұрын
Thank you for your reply
@subramaniyanm4814
@subramaniyanm4814 8 ай бұрын
Exec sp_helptext @object='procedure name',@columnname=billamount How use procedure?
@RenukaDeviPadmanaban-s3c
@RenukaDeviPadmanaban-s3c 8 ай бұрын
I want to truncate the stage table only once, before the For loop start. how to write that in precopyscript?
@BeardedDevData
@BeardedDevData 8 ай бұрын
I would recommend using a script activity.
@RenukaDeviPadmanaban-s3c
@RenukaDeviPadmanaban-s3c 8 ай бұрын
how can we write a precopyscript for truncating the Stage table once before the For loop start.
@BeardedDevData
@BeardedDevData 8 ай бұрын
I would recommend using a script activity.
@denseydelgado3779
@denseydelgado3779 8 ай бұрын
Thank you
@kozlo1
@kozlo1 9 ай бұрын
great tutorial I like your style. But the table you worked on is not attached so I am giving it 6/10, thumb down. Please upload the table. Like now the video is below modern standards because it's hard to follow what you talked about.
@BeardedDevData
@BeardedDevData 9 ай бұрын
Appreciate that, the idea behind was that if I show you how to do something and you can apply it with your data then you've learnt something, if I give you the data and you follow what I'm doing all you've done is follow a tutorial. I understand people might like to test things out first though so will take that on board.
@ManasNandMohan
@ManasNandMohan 9 ай бұрын
why do we have use sum here , without using the sum logic seems correct to me
@BeardedDevData
@BeardedDevData 9 ай бұрын
I understand where you are coming from but because we are grouping data we need to use an aggregate function otherwise the query would fail.
@trinhk
@trinhk 9 ай бұрын
Great video, thank you. Would you consider implementing the various checksum methods for data migration of millions or hundreds of millions records?
@BeardedDevData
@BeardedDevData 9 ай бұрын
It would depend on your acceptable range of collisions, certainly checksum is out the window, you'd have to use hashbytes with an algorithm that generates at least a 64-bit value. I've just had a look online for some numbers, found some details that say at 609 million rows you have a 1 in 100 chance of a collision, that is different inputs returning the same value, this may be acceptable as the alternative is column by column comparison to get 100% results. If this is a one off activity you could also use hashing then handle any collisions separately.
@joachimwengel3475
@joachimwengel3475 9 ай бұрын
I have tried so many things in excel to get data to look like this, so i could load it into power bi, and with small amount of data excel can do the trick, but my man you just saved my ass at work. Thank you so much for this. :)
@BeardedDevData
@BeardedDevData 9 ай бұрын
Fantastic, glad I could help.
@aunad___
@aunad___ 9 ай бұрын
Hey Brad! Thank you for this. My code works, but now I want to save the result as a view. how do i do that?
@BeardedDevData
@BeardedDevData 9 ай бұрын
Unfortunately you wouldn't be able to run this code within a View because it's a dynamic query, you need to use a Stored Procedure.
@mastans6539
@mastans6539 9 ай бұрын
Excellent Brad🤩
@KabirKhan-xi3ju
@KabirKhan-xi3ju 9 ай бұрын
Hi BeardedDev, I do have a challenge that I am facing. Let say you are creating a view on top of multiple schemas dbo and dbo2, dbo2 has some auxiliary fields in new table, that in the future will become a single schema in dbo. How would you change data in that sort of view where insert is needed for both tables? Lets say I don't want to use triggers on the view and schema dbo cannot be changed. Will really be interested to know your answer. Thanks.
@BeardedDevData
@BeardedDevData 9 ай бұрын
Think we should throw updating through a View out of the window for that scenario, this video was to show it can be done but it's very rare that it should be done. Creating the View on top of multiple tables is great but to run multiple inserts especially if the tables are related you need to use a stored procedure to control logic and add error handling.