Cast and Convert functions in SQL Server Part 28

  Рет қаралды 355,605

kudvenkat

kudvenkat

Күн бұрын

Пікірлер: 88
@monazab
@monazab 8 жыл бұрын
Thank you, this was helpful !
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 8 жыл бұрын
+Mona Zabihian Thank you so much for the feedback. Means a lot. Glad the videos are useful. Dot Net & SQL Server training videos for aspiring web developers kzbin.infoplaylists?view=1&sort=dd Download our training videos and slides for offline viewing www.pragimtech.com/Order.aspx Code Samples, Text Version of the videos & PPTS on my blog csharp-video-tutorials.blogspot.com Tips to best utilise our channel kzbin.info/www/bejne/r2ibYYCtnb5qZtU To receive email alerts, when new videos are uploaded, please subscribe to our channel using the link below kzbin.info Please click the THUMBS UP button below the video, if you think you liked them Thank you for sharing the link with your friends who you think would also benefit from them Best Venkat
@ayoforyou448
@ayoforyou448 4 жыл бұрын
@@Csharp-video-tutorialsBlogspot I am agree with mona, All videos very helpfull thank you again
@sohanyennu3750
@sohanyennu3750 8 жыл бұрын
This is the best SQL tutorials I have come across. I got trained from best of the professor from US based university but they are not as detailed as you in explanation.,,,,Kudos Mr.Venkat
@tanyasinha2897
@tanyasinha2897 7 жыл бұрын
You speak clearly.So easy to understand the concepts! Thanks.
@Djabsey1
@Djabsey1 11 жыл бұрын
Awesome as usual. Explained in great detail.. He has a gift for making seemingly complicated concepts very easy to understand.
@kayp2373
@kayp2373 3 жыл бұрын
Your explanation was very through. Thank you for making this video.
@Trzbne
@Trzbne 6 жыл бұрын
I would a bit modify the title: "Best SQL Server tutorial ever - Part 28"
@AwadheshKumarASIN211
@AwadheshKumarASIN211 8 жыл бұрын
Awsome, I am now watching ur each video step by step..... This is really helpful for me... Thanks for ur video.
@shivahustle
@shivahustle 7 жыл бұрын
this videos are very helpful for beginners. definitely ill suggest my friends... thank you so much
@sachingreat222
@sachingreat222 3 жыл бұрын
Thank you Venkat Sir your. Net core series is also perfect 👍👍
@Kurunseithi
@Kurunseithi 2 жыл бұрын
Thank you bro ur vidio is very useful for begginers
@sudhakotha
@sudhakotha 11 жыл бұрын
Hi venkat, thanks for your videos,that too cost free tutorials ,its really great and helpful. Thanks alot Venkat. Thank you so much.
@krzysztofs8535
@krzysztofs8535 7 жыл бұрын
Thanx! That's great ! It is very useful! You are great SQL teacher!
@tannertucker22
@tannertucker22 8 жыл бұрын
This was very good...thank you! I need to learn the difference between nvar and var
@vikastiwari6564
@vikastiwari6564 2 жыл бұрын
One of the best video even gone through...!! Thank you very much appreciated your efforts...!! Plz upload some unix command over here with good examples..
@karanjeetsingh2763
@karanjeetsingh2763 10 жыл бұрын
Thanks a lot for this wonderful series of tutorials
@ParvinderSinghSaini
@ParvinderSinghSaini 10 жыл бұрын
Wow. You learn SQL pazi Amazing!
@sustey
@sustey 11 жыл бұрын
really great, what a clear explanation, I feel very lucky that I found you youtube videos, going thru all of them.. Thanks a Billion
@adityakumarseth8934
@adityakumarseth8934 5 жыл бұрын
Very detailed...and very nice explanation
@keerthanaparthasarathy7369
@keerthanaparthasarathy7369 9 жыл бұрын
Very clear explanation!
@falazin
@falazin 7 жыл бұрын
that was amazing , you really solved my problems. thanks a lot
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 11 жыл бұрын
Hi James, due to youtube restrictions, I cannot include the link in a comment, so have included it in the description of this video.
@neelamsaroy3334
@neelamsaroy3334 4 жыл бұрын
Thank you Kudvenkat, amazing videos on SQL. DO you have similar video's for SSAS and SSIS
@anilbhatt4660
@anilbhatt4660 3 жыл бұрын
Thank you Venkat !
@anuragmohanty1238
@anuragmohanty1238 3 жыл бұрын
AWESOME SIR
@TheDemockery
@TheDemockery 9 жыл бұрын
Venkat, thank you VERY much for providing all of this material free of charge. For those of us who are hands on type of learners, is the database(s) for these tutorials available to download?
@Eisenhiem24
@Eisenhiem24 9 жыл бұрын
Hi Venkat.....Thanks a lot for these tutorials....I noticed that CAST and CONVERT does not work for Datatype DATETIME2...is it correct?
@priyagupta1256
@priyagupta1256 Жыл бұрын
You can use it in modify data type of a column instead of using alter table
@oyilatechnology
@oyilatechnology 11 жыл бұрын
Yes thanks you, that answer the question and solve my problems
@lancerkarthik
@lancerkarthik 12 жыл бұрын
Very well explained!!
@nirajshah7170
@nirajshah7170 4 жыл бұрын
Thank you very much for the explanation. I'm always following your videos to learn and find the solution related to SQL question. In one of my sql query result, I'm getting the error Conversion failed when converting the nvarchar value '`````````'to data type int. However, due to number of columns and tables in my query, I'm not able to find the exact value which cautioning the issue. Can please explain how can we find such values with multiple join tables and many columns. Thank you.
@anupbhimineni1564
@anupbhimineni1564 4 жыл бұрын
Venkat, I have a question! Can we use this cast and convert only for a date or else for any other datatype like int, varchar, etc?
@commanderconan93
@commanderconan93 9 жыл бұрын
I had made a table with column of data type datetime2 but neither CAST() nor Convert() worked with that column but when i changed it to datatype of datatime it worked ,, so is it just not working with datetime2 datatype ??
@stalinlouis8988
@stalinlouis8988 5 жыл бұрын
Hello sir, same as u explained in video i tried. But, getting the same values in nvarchar also.
@Ram-ld4qe
@Ram-ld4qe 2 жыл бұрын
Tq so much sir....
@krismaly
@krismaly 9 жыл бұрын
Revisit since I like it Thanks
@zeeshanhamid3057
@zeeshanhamid3057 9 жыл бұрын
sir kindly help with tutorial 27.plz tell me a simple way of calculating age it is very complicated.
@munishprabhakarify
@munishprabhakarify 4 жыл бұрын
Venkat Can we use Rollup query as GroupBy Rollup(Registration Date as Date)
@786sakhawt
@786sakhawt Жыл бұрын
Will This function also work for MYSQL or PostGress ?
@aliazad1118
@aliazad1118 5 жыл бұрын
perfect. Thanks a lot
@vinothganapathi5571
@vinothganapathi5571 5 жыл бұрын
Thank you bro
@kirteebhattarai1668
@kirteebhattarai1668 9 жыл бұрын
Hi Venkat! what's the datatype for DateofBirth you used while creating tblemployees?
@archrodney
@archrodney 9 жыл бұрын
Kirtee Bhattarai datetime
@rudrashivgan5476
@rudrashivgan5476 8 жыл бұрын
+Kirtee Bhattarai It is Datetime.Always Remember that Datetime has three Nano Seconds in the Decimal Position and the Datetime2 has 7 Nano Seconds in the Decimal Position.In Date Time Functions the "Get" Keyword is always associated with Datetime while "SYS" Keyword is always associated with datetime2. For Example....Getdate() and getutcdate() will always give you date in Datetime Datatype while Sysdatetime() and sysdatetimeoffset() will always give you date in datetime2 Format.Smalldatetime has no nanoseconds
@MrShashank59
@MrShashank59 9 жыл бұрын
Sir My Cast and Convert function is not working..Can You please help me..Both functions is written same value which is inside Dateofbirth table..EG : = 1991-11-15 00:00:00.000 in Dateofbirth..& When i convert this it's showing Again 1991-11-15 00:00:00.000 in ConvertedDBO..Please Help me sir..
@woodenstorm
@woodenstorm 5 жыл бұрын
Thank you!
@karanjadavid2178
@karanjadavid2178 3 жыл бұрын
In 2021 we have the CONCAT function that can combine Int and Nvarchar. Cheeers!
@shahzaibriaz6552
@shahzaibriaz6552 6 жыл бұрын
Love You Kudvenkat
@virenpatel7166
@virenpatel7166 2 жыл бұрын
Can you upload a Python tutorial for beginners?
@AlishSafarli
@AlishSafarli 5 жыл бұрын
HI BRO IF I EXECUTE THIS SELECT CAST('1993.06.19' AS nvarchar) IT IS STILL LIKE "1993.06.19" I AM USING SQL 2012 BUT IN YOUR EXAMPLE IT WOULD BE LIKE JUNE 6 1993 HOW DO I SOLVE THIS PROBLEM?
@robinprabhakar4213
@robinprabhakar4213 3 жыл бұрын
Check the data type of the DateOfBirth column.. It should be datetime data type to work like this.. If the column has nvarchar data type it won't work
@ManojKumarRabanshi
@ManojKumarRabanshi Жыл бұрын
@@robinprabhakar4213 I had the same issue, your solution solved my problem. Thank you
@durgeshparlewar8937
@durgeshparlewar8937 5 жыл бұрын
sir make video on performance of query ans SSIS
@mastansheikh6114
@mastansheikh6114 2 жыл бұрын
One think i understands from his tutorial , if u want to be best you need a best guide
@AmitKumarYadava
@AmitKumarYadava 4 жыл бұрын
It could be also convert Convert (char(13),tablenameofdateofbirth,104)
@naziajahan1657
@naziajahan1657 4 жыл бұрын
HI where can i get the DB you are working on.
@Csharp-video-tutorialsBlogspot
@Csharp-video-tutorialsBlogspot 11 жыл бұрын
Do you mean you want to insert the entire string into one column, including the single quote. If that's the case, we need to escape the single quotes. Please let me know, if this answers your question.
@ramchandramishra4376
@ramchandramishra4376 6 жыл бұрын
Hello sir, how to solve this problem ----->The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
@jontipass6755
@jontipass6755 5 жыл бұрын
create procedure st_getShifts as select s.sh_id as 'ID', s.sh_name as 'Name', format(s.sh_fromTime,'hh:mm tt') as'From', format(s.sh_toTime,'hh:mm tt') as'TO', s.sh_number as 'Number' from shifts s error show WHEN EXUCUTE Msg 195, Level 15, State 10, Procedure st_getShifts, Line 49 'format' is not a recognized built-in function name. HOW SOLVE PLS HELP ME
@bextla3737
@bextla3737 4 жыл бұрын
Hi. how may l convert date(text type) to date type. so my date is as 20 march 2020. and l want convert example: 20200320 (or 2020-03-20 etc). as l see it is differ than date to text type.
@chriswilliams4911
@chriswilliams4911 Жыл бұрын
👍👍👍👍👍👍
@naveendayyala1484
@naveendayyala1484 2 жыл бұрын
we can follow this concepts because its 10 years old video plz conform
@Robert.Marshall
@Robert.Marshall 2 жыл бұрын
yes, the functions and formatting seem to be the same in SQL server 2019 I'm using for class assignments today.
@champaghalley4848
@champaghalley4848 5 жыл бұрын
It is very help ful video for the Learners but in the in version 2014 it does not work and I try with following Syntax and it works. SELECT ID, Name, DateOfBirth, CONVERT(VARCHAR(15), DateOfBirth,9) AS ConvertedDate FROM Employees Result: 1 Sam 1980-12-30 Dec 30 1980 2 Pam 1982-09-01 Sep 1 1982 3 John 1985-08-22 Aug 22 1985 4 Sara 1979-11-29 Nov 29 1979
@Coafcoaf11
@Coafcoaf11 3 жыл бұрын
Thank you so much Mr. Ghalley, I tried your query and it worked!!!
@oyilatechnology
@oyilatechnology 11 жыл бұрын
sir pls what about if we want to insert to databased like inserting 'Home 7 Mbps','7,168kbp','768kbp','35GB','£45,000 ','£4,500') into a table
@srilakshmi3305
@srilakshmi3305 8 жыл бұрын
In 2005 SQL server how I to retrieve 'date' only from 'date time, data type
@none432
@none432 2 жыл бұрын
Can anyone help I want both string and intigers at a time
@Bullymaguire416
@Bullymaguire416 6 жыл бұрын
My date is stored in the varchar and I want to convert it to date type so that i can extract month and date from it. please help
@mariaxia2687
@mariaxia2687 3 жыл бұрын
We can also use CONCAT function. SELECT [Id], [Name] , CONCAT([Name], ' - ', [Id]) AS [Name-Id] FROM [dbo].[Employees]
@stutitehri993
@stutitehri993 10 жыл бұрын
requsting to upload linq C# tutorials
@sureshmolabanti7526
@sureshmolabanti7526 7 жыл бұрын
Write a query which returns the total number of registrations by Year? select cast(datepart(year,doj)as int)as 'DOJ',count(id) from tblDate group by cast(datepart(year,doj) as int)
@prashantgoel1659
@prashantgoel1659 5 жыл бұрын
how can i convert a video into a data in sql?
@alexislychine9199
@alexislychine9199 2 жыл бұрын
how to connect with you?
@suni2308
@suni2308 4 жыл бұрын
How to convert one date format into another, Ex to_date(column name, 'yyyy-mm-dd') , Column \_nam format is yyyymmdd.
@kruthiviswa3895
@kruthiviswa3895 4 жыл бұрын
I dint get the result same as in this video and the function created in last video
@durgeshparlewar8937
@durgeshparlewar8937 5 жыл бұрын
i have two column id and nane id 1 name salmankhan i want to split name like fname= salman and lname =khan into seprate column
@pokhreis
@pokhreis 8 жыл бұрын
can anyone help how do we convert YYYYMMDD (int) to MM/DD/YYYY(datetime) ?
@Tyler500x
@Tyler500x 7 жыл бұрын
you can use alter column statement to change the data type of the column
@AmitKumarYadava
@AmitKumarYadava 4 жыл бұрын
Use convert(char(13),tablename,101) It will show dd/mm/yyyy format
@zakiabdullahimohamed8619
@zakiabdullahimohamed8619 3 жыл бұрын
Sir I have error ?
@drs10301
@drs10301 5 жыл бұрын
Hi sir When I am converting Date to integer or decimal using cast and convert, it's reflecting the date value less than its actual value. Please suggest.
@AmitKumarYadava
@AmitKumarYadava 4 жыл бұрын
Simple use convert (char(13),Tablename,104) You can change date format by changing 104 You can use 101 to 105 and
@jeetendrachandorkar5432
@jeetendrachandorkar5432 5 жыл бұрын
how to convert mm to ft in
@priyagupta1256
@priyagupta1256 Жыл бұрын
Error has thrown
@ramchandramishra4376
@ramchandramishra4376 6 жыл бұрын
please help
Mathematical functions in sql server   Part 29
15:51
kudvenkat
Рет қаралды 242 М.
DatePart, DateAdd and DateDiff functions in SQL Server   Part 27
21:29
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 12 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 7 МЛН
CAST() and  CONVERT() in SQL Server
15:04
SQL Data Ninja
Рет қаралды 59 М.
Scalar user defined functions in sql server   Part 30
19:07
kudvenkat
Рет қаралды 520 М.
61 Cast and Convert in Sql Server
13:05
Learn SSIS
Рет қаралды 929
Stored procedures with output parameters   Part 19
18:20
kudvenkat
Рет қаралды 784 М.
Indexes in sql server   Part 35
11:13
kudvenkat
Рет қаралды 841 М.
Working with SQL NULL values | Null Handling Functions
11:18
Ankit Bansal
Рет қаралды 22 М.
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 12 МЛН