This is what I was looking for so many days. Finally landed to the right place. Thank you. Can you also show the same with the help of Substr() function.
@LearnatKnowstar3 жыл бұрын
Thank you so much. Sure. Will post a video soon.
@tarvinder912 жыл бұрын
Thank u for explaining that embedded queries. I was able to use that knowledge in other queries.
@LearnatKnowstar2 жыл бұрын
Thank you
@kapach100021 күн бұрын
❤ love this explanation.
@LearnatKnowstar21 күн бұрын
Thank you! Glad you found it helpful.
@suryakota7685 Жыл бұрын
Thank you so much , for your explanation, i was asked this question in one of Big MNC
@LearnatKnowstar Жыл бұрын
Glad to hear that
@pareshyadnik41083 жыл бұрын
can we use parse name function to split the string or there is a performance issue
@lia_sahin3 жыл бұрын
how to split a large table consisting of a single column with 15 attributes, there should be 15 columns. in MsSQL server. Thanks 😊!
@LearnatKnowstar3 жыл бұрын
There can be different approaches. One way can be to use string split function. Please see detailed tutorial here - kzbin.info/www/bejne/aqHHf517bp2FabM
@lia_sahin3 жыл бұрын
@@LearnatKnowstar thanks 😊
@Dracometeor5624 жыл бұрын
is this supported at SQL 2005 ?
@LearnatKnowstar3 жыл бұрын
Yes, it is.
@YouCallThataKnife253 Жыл бұрын
What if I no longer want to see that original concatenated column?
@pickmeisha11 ай бұрын
My field is 'Doe,John A' and I am trying to partition the A...this is not working as it pulls over the entire name when there is no middle initial.
@solomong.gebrhana1204 Жыл бұрын
what if we have 4 strings to extract? what is the best function to use?
@shubhamgoyal5227 Жыл бұрын
Hello mam if there is middle name then then could you please guide how to derive it e.g ram kumar bansal in this how can we derive kumar using sql query.
thank you very much for break it down to step by step
@LearnatKnowstar3 жыл бұрын
Thank you so much!
@latapant63714 жыл бұрын
Very useful video 🙏🙏
@LearnatKnowstar4 жыл бұрын
Thank you
@Manish247-R2 жыл бұрын
please tell me for 2 delimiters in between.
@LearnatKnowstar2 жыл бұрын
You can try using the Split String function. Please find below the video tutorial for the same - kzbin.info/www/bejne/aqHHf517bp2FabM
@Faisal15043 жыл бұрын
What about the space between the , and first name? Don’t we add +1 to charIndex. ?
@LearnatKnowstar3 жыл бұрын
Yes, you can do a +1 or apply trim on the extracted first name.
@abhishekrawat830511 ай бұрын
please provide DDL and DML commands also
@Hakeem_Abdul2 жыл бұрын
Can you pls help me with a similar request.?? My need is: if length of input field is more than 40 characters, then it should load data until last space before 40 characters to one column and the remaining should load to another column..
@tanyagupta63192 жыл бұрын
How many possibilities these SQL queries will come in the placement? I mean same as it came ya little bit differ has to be come?
@prashantx193 жыл бұрын
what if there are three commas
@LearnatKnowstar3 жыл бұрын
You can use string split function. See tutorial here kzbin.info/www/bejne/aqHHf517bp2FabM
@prashantx193 жыл бұрын
@@LearnatKnowstar thanks ... it really helpful.
@edgetransit33203 жыл бұрын
You saved my life lmfao. Thank you so much !!
@LearnatKnowstar3 жыл бұрын
Glad I could help!
@kitbodeephongkasem9092 жыл бұрын
If. Colum.name. some.row. Not have comma?
@Beyondhorizons-i5z4 жыл бұрын
Brilliant stuff!
@LearnatKnowstar4 жыл бұрын
Thank you
@raj-sk4br3 жыл бұрын
What about middle name?
@LearnatKnowstar3 жыл бұрын
If there is always a middle name, you can use charindex to extract the middle string. If the middle name might or might not exist, then more logic needs to be put in the SQL query.
@LearnatKnowstar3 жыл бұрын
Thanks for presenting this scenario. We will post a solution video soon.
@sanujidananjaya4 жыл бұрын
Thank you ! , Very usefull
@LearnatKnowstar4 жыл бұрын
Thank you
@NaveenKumar-fq4sb Жыл бұрын
where is data set ...
@prashantdahiya7112 жыл бұрын
Thank you Mam, 👍
@LearnatKnowstar2 жыл бұрын
Glad it was helpful 🙏
@HappyModernW33 жыл бұрын
Very helpful!!
@LearnatKnowstar3 жыл бұрын
Thank you
@landchennai85492 ай бұрын
select * from ( select * from #Emp cross apply string_split(Name,',',1) ) v pivot(max(value) for ordinal in ([1],[2]))v
@avinashkarad71413 жыл бұрын
i am using 11g .. i have data like below in 1 column col_name 1 john 34000 3 david 20000 want output like in 3 different columns like this id name salary 1 john 34000 3 david 20000 pls help me with this @Learn at Knowstar
@TheDistractionStudio3 жыл бұрын
Thank you!!
@LearnatKnowstar3 жыл бұрын
Thank you
@hnaidu.pro218 ай бұрын
Another Method: Using a Substring SELECT EmployeeID, Name, SUBSTRING([Name], CHARINDEX(' ', [Name], 1) + 1, LEN([Name])) AS FirstName, SUBSTRING([Name], 1, CHARINDEX(',', [Name], 1) - 1) AS LastName FROM [dbo].[tblNames] Method 2: Using Reverse function (along with LEFT, RIGHT) SELECT EmployeeID, Name, RIGHT([Name], CHARINDEX(' ', REVERSE([Name])) - 1) AS FirstName, LEFT([Name], CHARINDEX(',', [Name], 1) - 1) AS LastName FROM [dbo].[tblNames]