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.
| 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] |
 |
|
|
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 workschallenge everything |
 |
|
|
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) --identitySELECT dbo.fn_FilterString(@s, '[0-9]', 0) --just numbersSELECT dbo.fn_FilterString(@s, '[^0-9]', 0) --no numbersSELECT dbo.fn_FilterString(@s, '[a-z]', 0) --just lettersSELECT dbo.fn_FilterString(@s, '[a-z]', 1) --just lower case lettersSELECT dbo.fn_FilterString(@s, '[A-Z]', 1) --just upper case lettersSELECT dbo.fn_FilterString(@s, '[^ ,.]', 0) --removes spaces, commas and full stops*/
KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|