| Author |
Topic  |
|
|
pnpsql
Posting Yak Master
India
241 Posts |
Posted - 05/07/2012 : 01:10:22
|
HI TEAM,
I NEED TO COUNT UPPER CASE LETTERS IN STRING.
challenge everything |
|
|
khtan
In (Som, Ni, Yak)
Singapore
16745 Posts |
Posted - 05/07/2012 : 01:15:30
|
What happen to the fn_FilterString() that i suggested in your other thread ? Use that function
KH Time is always against us
|
 |
|
|
pnpsql
Posting Yak Master
India
241 Posts |
Posted - 05/07/2012 : 01:35:30
|
that returns both upper case and lower case. i correct but not works
challenge everything |
 |
|
|
khtan
In (Som, Ni, Yak)
Singapore
16745 Posts |
Posted - 05/07/2012 : 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 Time is always against us
|
 |
|
| |
Topic  |
|
|
|