How can i count the word in a cell.

Dear Experts,
i want to count the word in cell how can i do this ?
Isthere any function ?
plz give logic or command.

You can ty :
SQL> var text varchar2(50)
SQL> exec :text := 'How do I count the number of words in my cell?'
PL/SQL procedure successfully completed.
SQL> select text,
  2         sum(case when substr(text,rownum,1)=' '
  3                       and substr(text,rownum-1,1)!=' '
  4                  then 1
  5                  else 0 end) nb_word
  6  from (select rownum,:text||' ' text,length(:text) ln from dual)
  7  connect by level <= ln+1
  8  group by text
  9  /
TEXT
   NB_WORD
How do I count the number of words in my cell?
        11
SQL>  exec :text := 'How     do I count the number of words in my   cell?    '
BEGIN :text := 'How     do I count the number of words in my   cell?    '; END;
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1
SQL> var text varchar2(1000)
SQL> exec :text := 'How     do I count the number of words in my   cell?    '
PL/SQL procedure successfully completed.
SQL> select text,
  2         sum(case when substr(text,rownum,1)=' '
  3                       and substr(text,rownum-1,1)!=' '
  4                  then 1
  5                  else 0 end) nb_word
  6  from (select rownum,:text||' ' text,length(:text) ln from dual)
  7  connect by level <= ln+1
  8  group by text
  9  /
TEXT
   NB_WORD
How     do I count the number of words in my   cell?
        11
SQL> select * from v$version where rownum=1;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
SQL> Nicolas.
Well, we can discuss about what limit a word : here space, but there is point, double-point, and so on... And about what is a word : do the punctuation is a word ?
For example :
"It's a word !"=>how many words are in this sentence ?
http://en.wikipedia.org/wiki/Word
Message was edited by:
N. Gasparotto

Similar Messages

  • How can I count the number of unique cells?

    I have a column in my spreadsheet that looks like this:
    Date
    Items
    3/25
    Item A
    3/27
    Item A
    3/29
    Item A
    3/25
    Item A
    4/25
    Item B
    6/1
    Item B
    7/13
    Item B
    8/9
    Item B
    3/5
    Item C
    1/2
    Item C
    5/15
    Item D
    3/25
    Item D
    What I want is something that will list all the unique items that I have and count the number of times that Item shows up in my spreadsheet.  For example, the results should look like this:
    Item A: 3
    Item B: 4
    Item C: 2
    Item D: 2
    I thought for sure that I can do a chart in numbers and it would count the number of items but no, not so much.

    I apologize. When I pasted the table in Numbers running in French the values of column B were treated as dates.
    I leave the screenshot untouched because the contents of this column changes nothing to the calculations.
    In cell D2 of the main table, the formula is :
    =IF(ISBLANK(C),0,IF(COUNTIF($C$2:$C2,"="&$C2)=1,COUNTIF(C,"="&$C2)+(ROWS(A)-ROW( ))/100000,0))
    Apply Fill Down
    In cell A2 of table aux, the formula is :
    =IFERROR(LARGE(main :: D,ROW()-1),"")
    In cell B2 of table aux, the formula is :
    =IF(A>0,LOOKUP(A2,main :: D,main :: C),"")
    In cell C2 of table aux, the formula is :
    =INT(A)
    Apply Fill Down
    Yvan KOENIG (VALLAURIS, France) samedi 6 août 2011 23:33:10
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • I have converted a pdf to word. How can I access the Word file from my online account?

    I have converted a pdf to word. How can I access the Word file from my online account? When it says 'download the converted file' I choose a location on my PC and click, but nothing happens. It seems that it can only save the converted file to my online account. I went to my online account but I see no way to look for the file

    Hey Fabrizio,
    You might need to sign up at "https://cloud.acrobat.com/exportpdf" using your Adobe ID credentials to convert your PDF file to Word.
    Do you get the 'download' prompt?
    Also, you can find the converted files by clicking at the 'Files' tab. 
    Please try the same using a different browser and check.
    Hope to hear from you.
    Regards,
    Anubha

  • How can I sort the words in a document into an alphabetical list?

    How can I sort the words in a document into an alphabetical list? Thanks!

    writer888 wrote:
    How can I sort the words in a document into an alphabetical list? Thanks!
    Copy the words to the Mac's clipboard (Edit menu> Copy)
    Paste into TextEdit 
    Next open the Edit > Find > Find window in Text Edit.
    Highlight a space between two words and Edit menu > copy, paste into the Find field
    Next create a return in the middle of your text and copy that and paste into the Replace field
    Click Replace All.
    Now Edit > Select All and Edit > Copy
    Open a Spreadsheet program with Sort ability and paste into the second column cell from the top
    place a "a" into the top column cell, select the entire colum
    Sort desending order
    Now if you need it out of spreadsheet format, then your going to need to copy just the data cells (not the entire column to avoid problems) and Paste "Special" as unformatted text into a word processing program
    If you need to get rid of the Returns, do the opposite you did in Text Edit, replace the Returns with Spaces
    A chore, but it's rare one needs to sort words into alaphabetical order.
    FYI, I used TextEdit and the free LibreOffice (Spreadsheet and Word Processing) for the above effects.

  • Since I am writing the book in Italian,how can I replace the word CHAPTER with CAPITOLO ?

    Since I am writing the book in Italian, how can I replace the word CHAPTER with CAPITOLO ?

    I think you need to run iBA in Italian so the templates are in that language.  You can do that by switching your OS X to Italian and then reopening iBA or perhaps by using this app to just change the iBA language:
    http://www.tj-hd.co.uk/en-gb/languageswitcher/
    see also
    https://discussions.apple.com/message/20745332#20745332

  • How can I control the size of a cell in the GridBagLayout?

    Hi,Swing Gurus
    I am developing a swing-based program using JBulider5 enterprise.
    It seems to me that the GridBagLayout is really a hard nut!
    How can I control the size of a cell in the GridBagLayout?
    It seems that I cann't control the size of a cell directly.
    But how the size of a particular cell is determined when I switch the layout manager from XYLayout to GridBagLayout?
    Thx in advance!
    Regards,
    Justine

    hi,i have not done what you are asking but there are fields like
    COLUMNWIDTH, MINSIZE, MAXGRIDSIZE, PREFEREDSIZE to which you can set the appropriate values and test for your need.hope this helped.bye martian.

  • HOw can i change the color of a cell

    How can I change the color of a cell when it is selected. I select the cell by pressing enter, then I want the text in the cell to change color to red, but all the cells in the table change color. Please I would be grateful for some help

    Subclass DefaultTableCellRenderer.
    public class MyCellRenderer extends DefaultTableCellRenderer
    Override
    public Componet getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    JLabel lab = new JLabel(String)value);
    lab.setOpaque(true);
    return lab;
    if(isSelected)
    lab.setBackground(Color.red);
    else
    lab.setBackground(Color.white);
    Set the columns in your table:
    table.getCoulumModel.getColumn(0).setCellRenderer(new myCellRenderer());
    table.getCoulumModel.getColumn(1).setCellRenderer(new myCellRenderer());
    etc. for each column in your table.

  • How can I count the participants' number in TextChatApp? (using SharedObject, FMS)

    Hi all.
    How can I count participants' number?
    If the 3st user enter the room, the 3st user have to know that how many users are in the room.
    How do I know how many users are in the room?
    Thanks in advanced.
    Kevin.

    You have server side hooks for connections coming in or being closed (including here custom code for server disconnecting users for idle purposes).
    you need to keep track of the connections I don't remember now what FMS offers out of the box. Let's assume not much.
    When connection is coming in you can choose to accept or reject it. When you accept a connection you need to add it to your existing connections array or whatever data structure you use to keep track of them. Also you need to iterate to all connected users (clients) and call a custom method "userJoined()" on them to notify that a new user has joined.
    When a user leaves you need to remove the user from the collection and also notify that it left.
    on wowza you have stuff like :
    private HashSet();
    public void onConnect(IClient client, RequestFunction function,
                AMFDataList params) {
    public void onDisconnect(IClient client) {
    public void onConnectAccept(IClient client) {
        _connectedClients.add(client); 
        sendUserJoined();
    @param client
        public void onConnectReject(IClient client) {
             _connectedClients.remove(client); 
            sendUserLeft();
        public void sendUserJoined(String userName)
            Iterator it = _connectedClients.iterator();
            while (it.hasNext()) { 
                IClient each =  it.next();
                    each.call("userLeft", userName);
    FMS has similar hooks. This is simplified but you have a rough idea. You can call clients with no parameters and then is up to client so call back for updates to the server if interested. You need to implement "userJoined" and userLeft client side also.
    C

  • Hou can I count the words on a text

    I am using Iterator which I think it only counts unique word so who can I count the all the words on the text

    See i have Thispublic int getCount(String word) {
              // returns count for word
              Iterator<StringCounter> iter = ourWords.iterator();
              StringCounter sc;
              int count=0;
              while (iter.hasNext()) {
                   sc = iter.next();
                   if (sc.getString().equals(word)) {
                        sc.increment();
                   count++;
              return count;
         }this only gets the words that are unique

  • How can I do Count the Words in a cell with Numbers?

    I'm producing a documentary, with a long list of captions. I was hoping using numbers to organize the captions in sequence. them take the word count and do a simple calculation to work out the numbers of frames required per caption, based on a certian numbers of words per minute.
    I can handle calculations, but can't figure out how/if numbers can count the whole words in a cell and pass that on to a formula.
    I count them manually, but the nature of the script means the captions are being constantly updated.
    Any help appreciated!

    Clever. The only additional suggestion is to use the function Trim() just in case there are extra spaces between the words.
    =LEN(TRIM(B))-LEN(SUBSTITUTE(B," ",""))+1
    Rob

  • Applescript - how can I count the number of records in a Word data source?

    I have written a script in AppleScript to open Word and then perform a mail merge from a data source and everything is working fine.
    One thing I want to do but am struggling with is to return the number of records in the mail merge.
    I am trying things like:
    get last record of datasource of mydatasource
    and also haven't been able to find anything in the AppleScript 2004 Word Reference Guide.
    Can anyone help as I have been searching the web and trying things all day and I am sure it can't be difficult.
    Thank you.

    I don't think there is an automatic way to get a line count, but I don't have any problem just counting the lines on a page. Maybe some more information about what you are trying to do and why you can't do it would help someone to come up with a helpful suggestion.

  • How can i do the word processor's page operations in my java word processor

    Hai,
    I am developing a word processor using Java. It�s workspace is JTextPane. In order to give the page view and do page operation I have assigned one JTextPane per page.
    Generaly in a word processor if the cursor completes a page, a new page will be created and the cursor will be fixed in the starting position of the new page.
    I need to do the same thing in my word processor.
    That is I need to restrict the JTextPane(page) in such a way that the cursor has to be always inside the JtextPane. It means that the JTextPane (page) should not increase it�s size whenever the cursor goes out of it�s size. Instead a new JTextPane(page) can be created and the cursor can be fixed in starting position of the new JTextPane.
    Thing is that a text component can be added with or without the JScrollPane. In the first case both the scroll bar and the cursor will appear if it goes out of the text component�s rage. In the second case neither scroll bar nor cursor will appear. So these two will not help me.
    How can I do this in my word processor?
    I will be grateful to you if you send some suggestion.
    With regards,
    K. Saran

    Hi,
    this is not an answer to our question, sorry.
    I'm fairly new to Java but is working on a projec similar to yours. I always use other code to learn how new parts of java works. Haven't been able to find any examples of initializing JTextPanes though. Any chance of you posting some here?
    Would be much appriciated.
    Alternatively: do u know a site where u can find such examples??
    Kind Regards
    Thomas

  • How can i count the times one TAG occurred in a XMLTYPE?

    hi all
    is there method i can use to count the times one specified TAG occurred in a XMLTYPE?
    i just konw the method getClobVal,existNode,extract,...
    but none seems can help this
    anyone can help me?

    i see
    i think i know how to use Xpath func
    but when i try the following statement on sqlplus( Release 9.2.0.4.0),it says :"the XPATH is not supportted"
    declare
    l_xml xmltype;
    num number;
    begin
    select XML_BODY into l_xml from KD_SHIMEN_SEISEI w where FILE='SMNDATA';
    --get value OK!
    num := xmltype.extract(l_xml,'/Tag1[1]/Tag2/text()').getNumberVal();
    --sum or count ,failed,Xpath not support?
    num := xmltype.extract(l_xml,'sum(/Tag1/Tag2/text())').getNumberVal();
                   DBMS_OUTPUT.PUT_LINE(num);
    end;
    can u explain this?

  • How can I add the word "proof" over each photo....

    Would like to add the word "proof" or my studio name directly over all the photos in a catalog. Is this possible to do in lightroom? If so how?

    No.
    You can do it in the print panel when printing, in the Slideshow module or you can do it on export using the LR/mogrify export plugin, or using a Photoshop droplet, but you cannot actually change your images in Library to have an overlay like that.

  • How can I count the number of values in one column which answer to a condition in another column?

    I'm using Numbers 3.2 and would like to count the names in a column which satisfy a condition in a different column. There are 3 "streams" through which these names have come to me, and I would like to easily identify how many have come from each stream. Any help?

    Hi DirtyDawg,
    COUNTIF is your friend here.
    If your source is in column C and your streams are 1, 2 and 3:
    =COUNTIF(C,"=stream1")
    =COUNTIF(C,"=stream2")
    =COUNTIF(C,"=stream3")
    These need to be in a footer or header row or in a different column than C.
    hope this helps,
    quinn

Maybe you are looking for