Home » SQL & PL/SQL » SQL & PL/SQL » Count the characters
Count the characters [message #273684] Thu, 11 October 2007 06:22 Go to next message
kr_arvind
Messages: 85
Registered: April 2006
Location: Delhi
Member
Hi,

How to count the particular charater in a string.

Example:

Input
Arvindkumar

Output
a 2


Thanks
Arvind

[mod-edit]modified title.

[Updated on: Thu, 11 October 2007 06:32] by Moderator

Report message to a moderator

Re: SQL [message #273687 is a reply to message #273684] Thu, 11 October 2007 06:29 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
part of the OraFAQ forum Guide

How to get a quick answer to your question?

Quote (a Chinese proverb)

"He who asks a question may appear to be a fool, he who does not ask will remain a fool forever"

Before you decide to open a new topic, you should ask yourself:
  • First of all: did I try myself? Or am I just hoping that someone else is willing to do my work?
  • Did I read the documentation? A lot of questions are answered there. Really.
  • Have I checked the FAQ page?
  • Did I search the board properly? Have I also tried the Site Search Engine?
    A large group of questions posted here are just a déjà -répondu of the past.
  • Did I use Google? Even if your question hasn't been answered here, chances are that on other websites someone already has posted an answer.
  • Is my question specific to the Oracle database? Now, that may seem obvious since this site is called Oracle FAQs, but we get quite a few questions about Access and MS SQL Server here - and SQL between databases is not always compatible - so please ask any non-Oracle questions elsewhere. It will be to your advantage.
Ok, so you didn't find an answer yet. No sweat, you're welcome to post it here and a lot of people are happy to answer. They can, however, answer only if enough info is provided.


Search

MHE

[Updated on: Thu, 11 October 2007 06:30]

Report message to a moderator

Re: SQL [message #273689 is a reply to message #273684] Thu, 11 October 2007 06:30 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
Try this

select length(upper('Arvindkumar'))-length(replace(upper('Arvindkumar'),'A')) from dual

May be this can help you.
Re: SQL [message #273690 is a reply to message #273689] Thu, 11 October 2007 06:31 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
I've modified your title to something more appropriate.

MHE
Re: SQL [message #273699 is a reply to message #273689] Thu, 11 October 2007 06:57 Go to previous message
kr_arvind
Messages: 85
Registered: April 2006
Location: Delhi
Member
Thanks it's Working fine, even though I am a so lazy I cannot think of titles and I am an arrogant SOB.

[Updated on: Thu, 11 October 2007 07:48] by Moderator

Report message to a moderator

Previous Topic: getting count of non-zero, non-null values per row
Next Topic: Formatting NULL and regular numbers
Goto Forum:
  


Current Time: Sat Dec 03 20:23:02 CST 2016

Total time taken to generate the page: 0.09453 seconds