How to count a particular character in a column ??

I am facing a probem while intergrating a module, we have a column in which user inserts conditions like 1.asd.2.err.3.errr..etc..now my requirement is that i need to count the number of conditions made in this particular column . Can anyone please suggest me how to do this as i have tried many ways but couldn't get the desired result.

Do you mean like this?
SQL> ed
Wrote file afiedt.buf
  1  select length(regexp_replace(regexp_replace('1.asd.2.err.3.errr','([^0-9]|^)([0-9])','~'),'[^~]')) as num_conditions
  2* from dual
SQL> /
NUM_CONDITIONS
             3
SQL>

Similar Messages

  • How to display a particular character  of a word

    Hi,
    can anyone tell me how to display  a particular character of a word in smart forms,Ex:suppose word is India and i want to display character d..
    Thanks in advance.
    Rajesh

    please look at the below explanation:
    DATA: VAR TYPE CHAR20.
    VAR = 'INDIA'.
    WRITE:/ VAR(3) - THIS WILL PRINT FIRST THREE CHARACTERS OF THE INDIA SO THE OUTPUT WILL BE : IND
    WRITE:/ VAR+3(1) = THIS WILL PRINT 1ST CHARACTER AFTER FIRST 3 CHARACTERS SO THE OUTPUT WILL BE : I
    COPY REQUIRED CHARACTERS IN ANOTHER VARIABLE.
    DATA: VAR2 TYPE CHAR10.
    VAR2 = VAR+3(2) .

  • How to test if particular character is empty in a row

    Hi All ,
    Requirement : To split the input file into two files .
    If the length of the row is 93 characters and the condition is If characters from 28 to 32 are empty then create a file with the name PCO1 .txt else create a file with the name PCO2 .txt
    Please let me know how to test in a row if particular character has certain value or from 28 to 32 are empty .
    Thanks for your help

    hi Sharma,
    IF line+27(5) EQ space.
    ==> positions 28-32 have no value (i. e. all characters are spaces)
    ELSE.
    ==> positions 28-32 have some value
    ENDIF.
    some explanation:
    line+27(5) ==> this means: 5 characters after position 27
    hope this helps
    ec

  • How to remove a newline character from a column

    hi all...
    i have a column in a table in which some of the datas contain a newline character at their last.
    i need to remove those newline characters.
    for example.... a data is
    'abcd
    (notice the end of the quotation).....i need to get the data as...'abcd'
    plss help me...
    thanks in advance..

    thanks for ur reply...
    i got your point..but here what you have done is....u have inserted a particular character set in between 'abcd' and 'xyz' and afetr that just replaced those character set by null....
    but in my case the problem is a bit different...
    the datas are already present and what i have to do is to remove the newline spaces from the end of the datas.
    select replace(column_name,'<what shall i put here>',null) from table_name;
    in your example...that is 'chr(10)'...but in my case its a newline character....

  • Query Designer - how to count distinct  characteristic values in a column

    Hello Experts,
    I need to count the number of distinct occurences in a column and use it later for a percentage calculation. I'll give you a concrete example:
    Promotion_ID   Product    Promoted
    A  ******************  P1 ********  1
    A  ******************  P2 ********  0
    A  ******************  P3 ********  1
    B  ******************  P1 ********  0
    B  ******************  P3 ********  1
    C
    D
    A promotion ID can have more than 1 product associated with it. A product can be promoted (1) or not. A promotion_ID can be also empty (no products C and D)
    I need to calculate for each product the percentage of promotions where the product is promoted out of ALL promotions (4) or
    P1  25 %
    P2  0 %
    P3  50%
    How can I model this in the Query Designer ? How can I count the distinct Promotion_IDs ?
    Any ideas will be appreciated.
    Thanks
    Rado

    Hi,
    Please take a look at the docs below.
    https://websmp102.sap-ag.de/~sapdownload/011000358700002762432003E/HowToCount.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7e58e690-0201-0010-fd85-a2f29a41c7af
    Regards,
    ®

  • Hi Gurus! how to count number of records in any column of ALV Grid report

    Hi Guys!
    I want to know how can we count the number of records in any column selected by the user. Like for oe customer there might be 20 sale order that means for 10 customer there will be 200 Sale order. So if i select cutomer number column ti should give 10 out put and whern select sale order it should give 200 as output.
    -Anurag Jain

    Hi,
    Either you can use the hotspot_click event or double_click to show the Pop-up info of the Sales Order count or customer Count depending on the selection.
    In the hotspot_click event  method you have E_ROW_ID E_COLUMN_ID..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.
    In the double_click event  method you have E_ROW E_COLUMN..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.

  • How to count frequency of specific text in Column?

    Hi All,
    We have  an FR , designed in FR studio which when run, pulls from hfm the " Calculation Status" of all the entities in a text column.  The Status come as "OK", "SC","CN" ,"CH"etc. see below exmple:
    Entity                              Status
    C1                                   CH
    C2                                   SC
    C3                                   CN
    C4                                   CH
    Now If i am trying to apply some formula to calculate the number of times "CH" is coming in that column, its not getting possible.
    Somebody please suggest whether such functionality exist in FR or not. If yes, how can i achieve this.
    Thanks in advance for always help!

    Hi All,
    We have  an FR , designed in FR studio which when run, pulls from hfm the " Calculation Status" of all the entities in a text column.  The Status come as "OK", "SC","CN" ,"CH"etc. see below exmple:
    Entity                              Status
    C1                                   CH
    C2                                   SC
    C3                                   CN
    C4                                   CH
    Now If i am trying to apply some formula to calculate the number of times "CH" is coming in that column, its not getting possible.
    Somebody please suggest whether such functionality exist in FR or not. If yes, how can i achieve this.
    Thanks in advance for always help!

  • Count the total val of the column in matrix

    hi
    how to count the total value of the column in matrix
    eg:
    id     name     points
    10    sachin    100
    12     rama        80
    count the total points in the matrix
    180

    Hi Hareesh,
    Try This....
      Dim finaltot As Integer = 0
                    Dim i As Integer
                    For i = 1 To omatrix.RowCount
                        oedittot = omatrix.Columns.Item("points").Cells.Item(i).Specific
                        finaltot = finaltot + oedittot.value
                    Next
    Thanks
    Shafi

  • How do count the character in the given string?

    hi all,
    i have astring like 'AAAARAMARAOAAA'.
    i want count how many 'A's in this string using sql statement.

    Is that a joke? You asked that in a previous thread of yours: how do count how many 'A' s in this string using sql stmt?.
    C.

  • How to count number of sales orders generated in a month in SAP SD

    Hi SD Gurus,
    I have a very strange query from client. I have to count the number of sales order created in a month for a z report. For example 30 in Jan, 25 in Feb etc. Could anyone suggest me How to count number of sales orders generated in a month in SAP SD.
    Regards
    Vinod Kumar

    Hi,
    Goto the T.Code "SE16" or "SE16n" or "SE11".
    Enter the table name as VBAK
    Enter the created on date as the starting date of the period and to date as the end date.
    Enter.
    Click on "Number of Entries".It will tell you the number of entries created in a particular period.
    If you want a report,goto the T.Code "VA05n".
    Regards,
    Krishna.

  • How to count Number of  completed instances

    Hi all,
    I have one issue regarding *"How to Count Completed instances"* in SOA...
    How can i count the number of completed instances for a interface...Any idea or suggestion plzzzzzz....
    Thanks,
    Raj

    Hi Dariel Pérez ,
    By executing the Querey I'm able to get the State and num_cube instances but when I call this Query in BPEL by using DB adapter I get the following error
    BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: “JCA Binding execute of Reference operation ‘CountReq’ failed due to: Pure SQL Exception. Pure SQL Execute of SELECT (CASE WHEN STATE=1 THEN ‘OPEN AND RUNNING’ WHEN STATE=2 THEN ‘OPEN AND SUSPENDED’ WHEN STATE=3 THEN ‘OPEN AND FAULTED’ WHEN STATE=4 THEN ‘CLOSED AND PENDING’ WHEN STATE=5 THEN ‘CLOSED AND COMPLETED’ WHEN STATE=6 THEN ‘CLOSED AND FAUTED’ WHEN STATE=7 THEN ‘CLOSED AND CANCELLED’ WHEN STATE=8 THEN ‘CLOSED AND ABORTED’ WHEN STATE=9 THEN ‘CLOSED AND STALE’ WHEN STATE=10 THEN ‘NON-RECOVERABLE’ ELSE STATE || ” END) AS STATE, COUNT(*) AS NUM_OF_CUBE_INST FROM CUBE_INSTANCE GROUP BY STATE; failed. Caused by java.sql.SQLSyntaxErrorException: ORA-00911: invalid character . The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the “Perform an operation on a table” option instead. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value “-911″ to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. “. The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Any Suggetions.
    Thanks
    Mani

  • How to count number of items present in a data block

    hi all,
    how to count how many items present in a particular data block in oracle forms 10g.
    whether it is a text_item or display_item or list_item etc is there any method to do this.
    please reply....

    hi all,
    i have written this when-button pressed but the problem is how to get the next item name in the block
    DECLARE
         V_COUNT NUMBER:=0;
         V_FIRSTITEM VARCHAR2(100):='';
    BEGIN
         GO_BLOCK('BLOCK_ITEMCOUNT');
         V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
         LOOP
              V_COUNT := V_COUNT + 1;
              EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
              --V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
              --V_COUNT := V_COUNT + 1;
         END LOOP;
    END;

  • How to escape the special character ' (ascii 39) in a select query?

    Hi,
    does anybody know how to escape the special character ' (ascii 39) in a select query?
    I've tried a lot of ways but nothing seems to work, for example I try to get all
    names in table foo where coloumn name contains a '-sign (ascii 39)
    select name from foo where name like '%\'%';
    select name from foo where name like '%{'}%';
    select name from atg_horse where name like '%chr(39)%'
    ... but neither works, I end up with a ORA-01756: quoted string not properly terminated
    I would apriciate any help
    /Carl-Michael

    friends
    thanks for ur time and effort that u gave to reply to my problem.
    But my main problem is that when my application (VC++ 7) fires the following query in the oracle database , it does not return any rows.
    SELECT count(*) FROM ORGANISATION WHERE UPPER(ORGANISATION.ORGANISATIONNAME)
    LIKE N'&#946;%' ORDER BY ORGANISATION.ORGANISATIONNAME
    the above question in the previous thread was just to check on sql plus as it's editor does not support unicode characters.

  • How can I EXCLUDE particular folders/files from being included in the Lightroom 5 catalog?

    How can I EXCLUDE particular folders/files from being included in the Lightroom 5 catalog?
    I want to be able to specify paths and/or filename patterns that should NEVER be indexed in the catalog: not that they don't show up under certain circumstances, just that they are NOT THERE (in the catalog) to begin with!!
    I also do NOT want to have to respecify these criteria when "synching" the catalog; criteria should be PERMANENT (or at least 'til they're changed in LR preferences).
    I cannot be the only person in the world with this problem--but it sure seems like it, because I've spent an inordinate amount of time doing online searches & I can't find anything that addresses this issue.
    Can anyone PLEASE HELP me?
    BTW, Adobe employees (if there are any of you out there), I'm simply trying out LR now.  If I can't get this (seemingly fundamental) thing worked out (with relatively little effort), Adobe is going to LOSE A SALE of LR, because it's useless to me without this feature.
    Thanks,
    -t

    Thanks for the info... but how to you TELL LR to EXCLUDE images in a particular directory/directory structure?  The intuitive place to indicate this would be a right-click on the folder itself (or particular images), but no such option exists..  "???"  Thanks again, -pt
    The same way that you avoid buying things in your local convenience store. You don't stick a lot of labels on certain shelves, slap a credit card down on the counter each week, and announce you are buying everything that doesn't have a label on its shelf. You just choose the things you want to buy.
    Your mention of "synching the catalog" suggests that you are expecting the LR library, to mirror the total images in the computer by default. This is not IMO a useful way to think about it. LR contains no images at all, by default: the Catalog starts out empty.
    Then you Add just those selected images that you want to import, among those already in the computer. That's a one-off process which is IMO best achieved controllably in batches - which you can keyword and otherwise organise in LR terms as you go. For new incoming images, ongoing, it is a question of Copying, Moving or Adding these in defined batches as they occur - from the relevant location only - there is no need to re-consider the import of a wider body of images. And one would not want to repeat that whole task anyway: one's prior investment in achieving the right selectivity, has a positive value.
    RP

  • Count the repeated character in a string

    Hi Great Gurus,
    Please tell me how to know how many times a given character repeats in a string.
    Please mail me .
    Thanks Gurus,
    Rahul

    hi,
    same thread----
    Re: find number of occurances of a particular character
    data:  var1(30)  type c value 'ghghj#ghjgjgh#ghjghjg#ghjg#'.
    data : totcnt type i,
           cnt type i,
           v type c,
           n type i.
    cnt = strlen( var1 ).
    do cnt times.
    move var1+n(1) to v.
    if v eq '#'.
    totcnt = totcnt + 1.
    endif.
    n = n + 1.
    if n = cnt .
    exit.
    endif.
    enddo.
    write:/ 'No of #s', totcnt .
    Regards
    Reshma

Maybe you are looking for

  • Three panel brochure pdf export problem

    I've created a three panel brochure, using the Pages 2 template. I need to share this with Windows people (who will handle the actual printing), so I exported it to pdf format. It looks OK (and Apple automatically embeds the fonts, nice!). However, t

  • How do i get rid of all the duplicates in my itunes

    I have unistalled itunes reinstalled and now i have two of every song

  • Not able to connect to internet in boot camp

    First time using a mac computer so I decided to install vista on my macbook pro. But when I enter Vista I am not able to connect to the internet, I have looked through the leopard and vista discs trying to find the right files so I can use the intern

  • Print preview for cheque print

    hi experts,                How to see the print preveiw for f-58 tcode.

  • Database starts then stops

    Hello, I screwed up one of my test databases and no i don't have a backup. Database is Oracle10gR2 running on W2K3. Server is a virtual server. I assumed all the disks were on a vmware volume so I took a snapshot before playing around. After playing