i was facing issue while updating the transaction_date to date but then i used this query:- SET SQL_SAFE_UPDATES = 0; UPDATE sales SET transaction_date = STR_TO_DATE(transaction_date, '%d-%m-%Y'); SET SQL_SAFE_UPDATES = 1; and it went perfectly and format was changed to date forat after altering the table.
For me, this is not working, I still couldn’t update the date format. It’s still showing the error msg 1411 as it is showing for U.. can u give me a solution for this please ?
There are a lot of SQL courses out there but nothing like this because SQL codes are used in real life/project based forum which makes it more clear on how you can benefit from SQL codes. The documentation makes it even more understandable and you can connect the dots in a much easier way. More project like this please 🙏
It was an excellent explanation of every requirement with Mysql and Powerbi. It helps a lot for practicing and learning more. Thank you! Please also do a video on the most essential useable DAX queries and Snowflake. It will be helpful again.
I have the following questions: 1. In this scenario we are manually importing a file in SQL and then will get this data in PBI to show various KPIs. What if I could have used Excel files hosted on SharePoints and do the same? It would become dynamic without manual interventions. I would be able to import multiple files then based on my criteria. 2. Is it possible to auto import files in SQL Tables along with file names which'll make our imported data dynamic and will allow the user to play around? 3. Is it possible to automatically delete certain imported data portions. E.g - Lets say I would only like to keep data for the last 30 days and remove the rest from SQL table. 4. Can we use Power Automate to answer my above queries? I would certainly wait or your next video if all or any of them can be addressed. Thanks for this wonderful video.
ONE MORE SUGGESTION NEXT TIME PLEASE use Snowflake to load the data and teach because it took me more than hour to load the data in MYSQL(i use 16gb ram latest laptop) but where as in SNowfalke it took me just 5 seconds to load the data and now I was good to go.....
thank you so much brother, I have wasted alot of time that how to change date format but now I learned through this , before tried alot of videos, chat gpt , googling etc but I forgot "Y" instead "y" used🥵
2:10:58 INSTEAD OF WRITING OR COPYING EVERYTHING into group by statement U can just say 1 (i.e., in select statement i have written the case statement in 1st place so IN GROUP BY MENTION 1 ) to make the query look readable and easy
For Last question we can use this also right ? Its giving same output select dayname(transaction_date) as names_of_days,round(sum(transaction_qty * unit_price),0) as total_sales from coffee_shop where month(transaction_date) =5 group by dayname(transaction_date);
Can someone please let me know what are the other steps to import the data into mysql, it's taking crazy amount of time like seriously 😳, There should be some alternative ways to wrap thi process up in few minutes. Help if someone knows.
Bro for me I did'nt connect MYSQL connector with powerbi once I download connect but its does'nt connect with powerbi what can I do can you pls tell me
Hii, hope you're doing well i've this pblm where we do the total sales for the specific month, so im getting the total sales of all the 12 months but i could not get the total sales for a particular month it is showing me the null value and also i was not able to resolve the date datatype query . please help me to solve this issue and move forward into the project
We all get this error because this Stupid has given us wrong Excel data file, see the date format in his Excel file and our Excel file that we have downloaded through drive.
it would have been better if the data was divided into different tables, the database is not even normalized properly , should atlest normalise to the 3rd normal form
hello sir i am getting this below error while importing CSV file in MSSQL TITLE: Microsoft SQL Server Management Studio Error inserting data into table. (Microsoft.SqlServer.Import.Wizard) ------------------------------ ADDITIONAL INFORMATION: Error inserting data into table. (Microsoft.SqlServer.Prose.Import) Column 'transaction_date' does not allow DBNull.Value. (Microsoft.Data.SqlClient)
UPDATE coffee_shop_sales SET transaction_date = STR_TO_DATE(transaction_date, '%d-%m-%Y'); - tried this and getting error (update coffee_shope_sales set transaction_date = str_to_date(transaction_date,'%y-%d-%m') where transaction_date is not null Error Code: 1411. Incorrect datetime value: '01-01-2023' for function str_to_date 0.000 sec). Kindly help me on this
I also encountered same error. Infact, I have been on it for some hours now. However, I got the trick and it worked. The Date format initially was month/day/year. You can check to confirm. So all you need is to follow same progression in your query. UPDATE coffee_shop_sales SET transaction_date = STR_TO_DATE(transaction_date, '%m/%d/%Y'); It worked for me. I am pretty happy to share the solution with you.
@47:58 I can't seem to run the query "UPDATE coffee_shop_sales SET transaction_date = STR_TO_DATE(transaction_date, '%d-%m-%Y');. It just gives me the ErrorCode 1411 Incorrect datetime value, similar to what we see in the video. However, you glass over how that was resolved because then I do see the next time you select * from coffee_shop_sales, that this has been fixed. How do I fix the Error Code 1411?
UPDATE coffee_shop_sales SET transaction_date = STR_TO_DATE(transaction_date, '%d-%m-%Y'); - tried this and the result is Error as shown in the demo (47:46)