Cast and Convert functions in SQL Server   Part 28

Cast and Convert functions in SQL Server Part 28

kudvenkat

11 лет назад

350,480 Просмотров

Ссылки и html тэги не поддерживаются


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

Mona Zabihian
Mona Zabihian - 27.01.2016 13:11

Thank you, this was helpful !

Ответить
Sakhawat Khan
Sakhawat Khan - 07.11.2023 14:39

Will This function also work for MYSQL or PostGress ?

Ответить
Priya Gupta
Priya Gupta - 25.09.2023 19:57

Error has thrown

Ответить
Chris Williams
Chris Williams - 15.02.2023 04:23

👍👍👍👍👍👍

Ответить
Naveen Dayyala
Naveen Dayyala - 27.10.2022 21:40

we can follow this concepts because its 10 years old video plz conform

Ответить
Ram
Ram - 10.09.2022 14:40

Tq so much sir....

Ответить
Viren Patel
Viren Patel - 06.08.2022 16:48

Can you upload a Python tutorial for beginners?

Ответить
none
none - 31.05.2022 04:17

Can anyone help I want both string and intigers at a time

Ответить
Alexis Lychine
Alexis Lychine - 09.05.2022 22:23

how to connect with you?

Ответить
Mastan Sheikh
Mastan Sheikh - 27.02.2022 07:26

One think i understands from his tutorial , if u want to be best you need a best guide

Ответить
Vikas Tiwari
Vikas Tiwari - 06.12.2021 16:28

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

Ответить
Prem Kumar S
Prem Kumar S - 30.11.2021 12:34

Thank you bro ur vidio is very useful for begginers

Ответить
David Mwangi
David Mwangi - 10.10.2021 11:23

In 2021 we have the CONCAT function that can combine Int and Nvarchar. Cheeers!

Ответить
Kay P
Kay P - 10.10.2021 01:40

Your explanation was very through. Thank you for making this video.

Ответить
Sachin Bhalerao
Sachin Bhalerao - 24.08.2021 20:58

Thank you Venkat Sir your. Net core series is also perfect 👍👍

Ответить
Anurag Mohanty
Anurag Mohanty - 23.07.2021 21:42

AWESOME SIR

Ответить
Zaki Abdullahi
Zaki Abdullahi - 29.05.2021 10:04

Sir I have error ?

Ответить
Maria Xia
Maria Xia - 17.04.2021 17:40

We can also use CONCAT function.
SELECT [Id], [Name]
, CONCAT([Name], ' - ', [Id]) AS [Name-Id]
FROM [dbo].[Employees]

Ответить
Anil Bhatt
Anil Bhatt - 17.12.2020 14:02

Thank you Venkat !

Ответить
Anup Bhimineni
Anup Bhimineni - 09.11.2020 12:57

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?

Ответить
bext la
bext la - 02.11.2020 22:20

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.

Ответить
Kruthi Viswa
Kruthi Viswa - 22.07.2020 23:39

I dint get the result same as in this video and the function created in last video

Ответить
suni2308
suni2308 - 13.05.2020 20:17

How to convert one date format into another, Ex to_date(column name, 'yyyy-mm-dd') , Column \_nam format is yyyymmdd.

Ответить
Neelam Saroy
Neelam Saroy - 04.05.2020 11:46

Thank you Kudvenkat, amazing videos on SQL. DO you have similar video's for SSAS and SSIS

Ответить
Niraj shah
Niraj shah - 05.02.2020 16:24

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.

Ответить
Nazia Jahan
Nazia Jahan - 28.01.2020 13:06

HI where can i get the DB you are working on.

Ответить
MUNISH PRABHAKAR
MUNISH PRABHAKAR - 01.01.2020 17:19

Venkat Can we use Rollup query as GroupBy Rollup(Registration Date as Date)

Ответить
Amit Kumar Yadava
Amit Kumar Yadava - 02.12.2019 20:27

It could be also convert
Convert (char(13),tablenameofdateofbirth,104)

Ответить
Jeetendra Chandorkar
Jeetendra Chandorkar - 29.11.2019 07:24

how to convert mm to ft in

Ответить
stalin louis
stalin louis - 08.11.2019 08:08

Hello sir, same as u explained in video i tried. But, getting the same values in nvarchar also.

Ответить
Durgesh Parlewar
Durgesh Parlewar - 16.10.2019 12:57

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

Ответить
Durgesh Parlewar
Durgesh Parlewar - 16.10.2019 12:54

sir make video on performance of query ans SSIS

Ответить
Alish Safarli
Alish Safarli - 06.10.2019 17:18

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?

Ответить
vinoth ganapathi
vinoth ganapathi - 21.08.2019 23:12

Thank you bro

Ответить
Rajashekar D
Rajashekar D - 19.08.2019 20:03

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.

Ответить
jonti pass
jonti pass - 11.06.2019 13:21

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

Ответить
Aditya Kumar Seth
Aditya Kumar Seth - 29.05.2019 15:47

Very detailed...and very nice explanation

Ответить
Dmitriy Yudnikov
Dmitriy Yudnikov - 20.05.2019 10:01

Thank you!

Ответить
Ali Azad
Ali Azad - 07.04.2019 15:51

perfect. Thanks a lot

Ответить
Prashant Goel
Prashant Goel - 02.02.2019 12:54

how can i convert a video into a data in sql?

Ответить
Champa Ghalley
Champa Ghalley - 25.12.2018 09:54

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

Ответить
BulliedMaguire
BulliedMaguire - 09.09.2018 10:54

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

Ответить
Ramchandra Mishra
Ramchandra Mishra - 19.04.2018 17:48

please help

Ответить
Ramchandra Mishra
Ramchandra Mishra - 19.04.2018 17:48

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.

Ответить
Trzbne
Trzbne - 02.04.2018 12:31

I would a bit modify the title: "Best SQL Server tutorial ever - Part 28"

Ответить
Shahzaib Riaz
Shahzaib Riaz - 14.01.2018 20:34

Love You Kudvenkat

Ответить
saad alkandari
saad alkandari - 26.06.2017 20:36

that was amazing , you really solved my problems. thanks a lot

Ответить
Suresh Molabanti
Suresh Molabanti - 01.05.2017 09:16

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)

Ответить
Krzysztof S
Krzysztof S - 16.01.2017 19:02

Thanx! That's great ! It is very useful! You are great SQL teacher!

Ответить