Googlehusband Posted October 12, 2020 Report Posted October 12, 2020 empid ------ 11222,23,94 110,22222,111 12,1990000,1000 I need to get only values before comma(,) 11222 110 12 what function I can use in sql server Quote
Googlehusband Posted October 12, 2020 Author Report Posted October 12, 2020 trim substring not working Quote
Spartan Posted October 12, 2020 Report Posted October 12, 2020 use CHARINDEX(), look for comma, and print the values before it. Quote
ring_master Posted October 12, 2020 Report Posted October 12, 2020 string split anta..o saari google seyaraade @Googlehusband 2 Quote
Googlehusband Posted October 12, 2020 Author Report Posted October 12, 2020 4 minutes ago, Spartan said: use CHARINDEX(), look for comma, and print the values before it. Charindex worked baa google chesa. Quote
Googlehusband Posted October 12, 2020 Author Report Posted October 12, 2020 select substrin (empid,0,charindex(',',empid) from table vachindhi 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.