Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 12890

Issue with Like operator

$
0
0

Hello Everyone,

I have values of column "Job_Name" in the below way.

sderg_AS_ASDFSDFS_DF__D_FG__Dsdfsdf 

I have a query to print all the characters that occur before first "_" i.e, "sderg" in this case.

select "Job_Name", substr("Job_Name",1,locate('_',"Job_Name")-1),from  table_name

I am unable to write a query to print all the characters that occur after last "_" i.e, "Dsdfsdf" in this case.

Thanks in advance.


Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.


Viewing all articles
Browse latest Browse all 12890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>