Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 COUNT UPPER CASE

Author  Topic 

pnpsql
Posting Yak Master

246 Posts

Posted - 2012-05-07 : 01:10:22
HI TEAM,

I NEED TO COUNT UPPER CASE LETTERS IN STRING.

challenge everything

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-05-07 : 01:15:30
What happen to the fn_FilterString() that i suggested in your other thread ? Use that function


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

pnpsql
Posting Yak Master

246 Posts

Posted - 2012-05-07 : 01:35:30
that returns both upper case and lower case. i
correct but not works

challenge everything
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-05-07 : 01:43:38
quote:

/*
Returns a string with specified characters left or removed. Run the examples for clarity.

Examples:

DECLARE @s VARCHAR(500)
SET @s = '1a2b&3,45 c,>DE.$~99X yZ'

SELECT dbo.fn_FilterString(@s, '_', 0) --identity
SELECT dbo.fn_FilterString(@s, '[0-9]', 0) --just numbers
SELECT dbo.fn_FilterString(@s, '[^0-9]', 0) --no numbers
SELECT dbo.fn_FilterString(@s, '[a-z]', 0) --just letters
SELECT dbo.fn_FilterString(@s, '[a-z]', 1) --just lower case letters
SELECT dbo.fn_FilterString(@s, '[A-Z]', 1) --just upper case letters
SELECT dbo.fn_FilterString(@s, '[^ ,.]', 0) --removes spaces, commas and full stops
*/




KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -