sql server - SQL Select only the words that are in Capital -


i have example column starts string values in capital letters , continues in lower case:

this sentence in uppercase , in lower case 

is there way select substring contains uppercase letters?

declare @searchtext varchar(100) = 'this sentence in uppercase , in lower case' declare @i int = 1, @l int = len(@searchtext)  while (@i <= @l , 1 = charindex(upper(left(@searchtext,@i)),@searchtext collate latin1_general_cs_as)) begin     set @i = @i+1 end  select rtrim(left(@searchtext, @i-1)) 

i can't work patindex btw., no matter put collation info.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -