Posts
33
Comments
186
Trackbacks
0
Remove all characters words after certain character word in SQL
If you want to get rid of all the data after certain word in SQL column, you can use the combination of LEFT and CHARINDEX function to achieve the desired result.

For example, if column consists of following data - 

Column1
-----------

tempdata1 tempdata2;tempdata3

and if you want to display only uptill the semicolon in result - then use the following query:

SELECT LEFT(Column1, CHARINDEX(';', Column1)-1)

RESULT

tempdata1 tempdata2


posted on Friday, August 14, 2015 12:24 PM Print
Comments
Gravatar
# re: Remove all characters words after certain character word in SQL
uxbridge
2/7/2018 5:20 PM
It's a great job that has been accomplished. uxbridge-escorts.com
Gravatar
# re: Remove all characters words after certain character word in SQL
covasi
2/20/2018 7:05 PM
The opinion of the mcdvoice.com customers helps their business to grow better and also they can draw the attention of even more customers.

Post Comment

Title *
Name *
Email
Comment *  
Verification