Mixed case (alternate upper & lower)...

Hello Friends,
1) always 1st character is lowercase,2nd character is uppercase and so on.
2) ignore the spaces/numbers while converting i.e. alternate lower and upper case character
input:
hello world
Good Morning
All Are Fine Here
output:
hElLo WoRlD
gOoD mOrNiNg
aLl ArE fInE hErE
Any help will be appreciated.

SQL> with greetings as
  2    (select 'hello world'       greet from dual union all
  3     select 'Good Morning'      greet from dual union all
  4     select 'All Are Fine Here' greet from dual)
  5    --
  6    select greet,
  7           max(replace(sys_connect_by_path(decode(mod(rn, 2),1,lower(lett),upper(lett)),'/'),'/')) new_greet
  8      from (select t.*,
  9                   lev - sum(decode(lett, ' ', 1, 0)) over(partition by greet order by lev) rn
10              from (select greet, substr(greet, level, 1) lett, level lev
11                      from greetings
12                    connect by level <= length(greet)
13                           and prior greet = greet
14                           and prior dbms_random.value is not null) t) tt
15    connect by prior greet = greet
16           and prior lev + 1 = lev
17     start with lev = 1
18     group by greet
19  /
GREET             NEW_GREET
All Are Fine Here aLl ArE fInE hErE
Good Morning      gOoD mOrNiNg
hello world       hElLo WoRlD
SQL

Similar Messages

  • Fetching data from database in case of mixed case in SE37

    Hi,
    I have created a function module(in se37) where the input is Last name(PA0002-NACHN). My requirement is i have to fetch data from PA0002 based on last name. But the problem is if i give a name in mixed case(both upper and lower) sap converts the last name into Capital letter and starts searching the database.
                      But i tried in abap editor. here SAP accept the parameter(last name) as mixed case and starts searching. Why in function module the parameters are converted into upper case. How to restrict it.
                 If i will create a domain with LOWER CASE check box checked and try to call the dataelement in import part of function module then also it's converting it inot upper case. If i uncheck the lower case check box then also it's taking it as upper case.
                How to process the input parameter in function module(SE37) which should take the input as user enters,i.e if user enters small letter it should take it as small letter , if mixed letter it should take it as mixed letter and start searching.
    regards
    sandeep

    HI sandeep,
    <i>"If i will create a domain with LOWER CASE check box checked and try to call the dataelement in import part of function module then also it's converting it inot upper case. If i uncheck the lower case check box then also it's taking it as upper case."</i>
    I think the data is getting converted to upper case even before it is passed to this FM.
    Can yo ushow how are you testing this FM?
    If you are calling this FM in a abap program using a parameter, it will convert the text to upper case as and when you enter data the name in it.
    Regards,
    Ravi

  • Conversation lower case to upper case by default not wanted

    Hi,
    Oracle converts lower case table names and columns names to upper case by default. To keep lower case letters names must be quoted. This "work around" is not acceptable.
    Is there a way to change this behavior either for the database or for a session?
    Thanks

    Easy answer. We are migrating from sybase ASE to
    oracle. Sybase supports mixed lower/upper case by
    default.Which is a proprietary behavior. After all these years of accusing Oracle of not conforming to standards, when they do (or come close) it bites them. <g>
    Users are familiar with reading column names like
    "RxCellsHec0Clp0" instead of "RXCELLSHEC0CLP0".
    Yes, there are users working directly with sql.If the users are used to putting the column name in double-quotes, then creating the table with identifiers in double-quotes will conform to the expected behaviour. That simply means that each and every reference to the table requires double-quote around the identifiers.
    And it is quite impossible to get them changing all their queries
    from select RxCellsHec0Clp0 from ...
    to select "RxCellsHec0Clp0" from ...One alternative is to wrap every table (of concern) with a view. My thought would be to leave the table with upper case identifiers, have the view with mixed-case identifiers, and use private synonyms to redirect the user to the view.
    The assumptions are
    1) user-oriented security is in place
    2) users use the quoted-identifier syntax

  • How to translate the key words in ABAp program from lower case to upper cas

    How to translate the key words in ABAp program from lower case to upper case?

    Hi Kittu,
    You need to set the Pretty Printer settings to achieve key words in ABAP program from lower case to upper case.
    Utilities -> Settings -> Pretty Printer (tab) -> Select third radio button.
    Thats all.
    <b>Reward points if this helps.
    Manish</b>

  • How to search for upper/lower case using string using JAVA!!!?

    -I am trying to write a program that will examine each letter in the string and count how many time the upper-case letter 'E' appears, and how many times the lower-case letter 'e' appears.
    -I also have to use a JOptionPane.showMessageDialog() to tell the user how many upper and lower case e's were in the string.
    -This will be repeated until the user types the word "Stop". 
    please help if you can
    what i have so far:
    [code]
    public class Project0 {
    public static void main(String[] args) {
      String[] uppercase = {'E'};
      String[] lowercase = {'e'};
      String isOrIsNot, inputWord;
      while (true) {
       // This line asks the user for input by popping out a single window
       // with text input
       inputWord = JOptionPane.showInputDialog(null, "Please enter a sentence");
       if ( inputWord.equals("stop") )
        System.exit(0);
       // if the inputWord is contained within uppercase or
       // lowercase return true
       if (wordIsThere(inputWord, lowercase))
        isOrIsNot = "Number of lower case e's: ";
       if (wordIsThere(inputword, uppercase))
         isOrIsNot = "number of upper case e's: ";
       // Output to a JOptionPane window whether the word is on the list or not
       JOptionPane.showMessageDialog(null, "The word " + inputWord + " " + isOrIsNot + " on the list.");
    } //main
    public static boolean wordIsThere(String findMe, String[] theList) {
      for (int i=0; i<theList.length; ++i) {
       if (findMe.equals(theList[i])) return true;
      return false;
    } // wordIsThere
    } // class Lab4Program1
    [/code]

    So what is your question? Do you get any errors? If so, post them. What doesn't work?
    And crossposted: how to search for upper/lower case using string using JAVA!!!?

  • Converting mixed case table name to upper case

    I am migrating data from Access to Oracle and new tables and columns being created are in mixed case is there a way to convert all tablename or column name automatically.
    Also does the migration workbench handle the memo fields currently defined in my oracle database.

    If you want tables and columns to be created in Upper Case then make sure the Create ANSI-Compliance Names checkbox is unchecked in the options section.
    1.Open Workbench.
    2.Tools -> Options
    Memo fields are migrated to CLOB fields in Oracle.

  • How to convert a string from lower case to upper case withour using transla

    Hi all,
    how to convert a string from lower case to upper case withour using translate,
    Thanks in Advance,
    Reddy

    Refer to this related thread
    Re: hi guys this very urgent please help

  • Internal Order match-code fail becuase Upper-Lower case

    Hi
    I'need to search Internal Order using a piece of teh Order description.
    Unfortunately the description COAS-KTEXT is case sensitive, and the Order is not found if Upper/lower case rules are not respected. I Have create a new Z match-code, bust this has the same problem.
    Any Idea to solcve thsi issue ???
    Thanks for your help.
    Claudio

    Hello
    pls check OSS note 75233, is decribed the solucion you are looking for.
    Solution
    Check whether an F4 search for short text is required.
    You must then either allow for the fact that the selection criteria "short text" is case-sensitive, or you can change all the short text to uppercase. This change is then effective during all displays and entries of the short text for the order and cannot be reversed. Any information which is provided in lowercase letters is then lost.
    You should also consider creating an index for the field AUFK-KTEXT.
    If you want to change to uppercase letters, proceed as follows:
    1. Modify the table AUFK. The field KTEXT requires another data element with a domain in which the flag "lowercase letters" is not marked. The most effective solution is to copy the data element and the domains and in addition to the descriptions, change only flag "lowercase letters"
                  This change means that for overhead cost orders (transactions KO01, KO02) only short text in uppercase letters can be recorded. 
    2. To change the already existing database entries to uppercase letters run report RDOTXT2U which is contained in the standard program and the current version of which is shown below. Please read the documentation for this report.

  • Changing Mixed Case (Title) headings to Lower Case...

    Hi,
    I am converting several word documents into InDesign CS3 documents in order to create a book. Certain paragraph headings use mixed case (Title Case) and I wish to change each of these into lower case and then apply a character style using an expert font. This seems to be a great task for GREP. However, I have not had much success with creating the correct expression. Any tips or tricks for doing this sort of thing? Also, do you know if there is a shortcut assigned to (Title Case)? It may be the case I will have to use the shortcut key to apply Title Case.
    Thanks in advance for your assistance.
    Kind regards,
    Greg

    Hi Greg,<br /><br />Glad it helped. I was actually referring to the simple all-purpose one <br />which will use whatever grep settings you have. Just save the following <br />script as GrepToLowercase.jsx (or whatever you want), and after setting <br />your grep settings in the dialog, just run the script.<br /><br />finds = app.documents[0].findGrep();<br />for(i=0;i<finds.length;i++){<br />    finds[i].contents=finds[i].contents.toLowerCase();<br />    }<br /><br />-- <br />Harbs<br />http://www.in-tools.com<br />"Automated Publishing for the Rest of Us!"

  • Upper Lower Case for Input Fields of ALV

    Hi,
    i have an ALV has some input fields columns. All values of input fields are upper case after entering something into that input fields (etc. airline -> AIRLINE).
    how to add upper lower case control to ALV? (etc. airline -> airline, AIRLINE -> AIRLINE)
    Thanks.

    Dear Narullah,
    The elements of your table consists of data types you can maintain in the SE11.
    The data type are based on a domain which you can maintain in SE11 as well.
    Just go to SE11 and check the domain which is behind the table field. On the tab "Definition" of the domain just checkmark "Lower Case". Afterwards the system does not translate your input to upper case automatically.
    If you use a SAP domain, you need to copy it to customer namespace, set the lower case flag, create a new data type based on your own domain and use it in the structure of your internal table.
    Does this help?
    Regards,
    Hendrik

  • Screenpainter Attribut Upper/Lower case

    Hello,
    i want to set the attribut 'Upper/lower case possible' to an element in a table control, but it is not possible.
    I can't set the falg, it's greyed out. Please help.
    Best regrads,
    Thomas Strehle

    Hi Thomas,
      For me it is coming, it is char field. In
      screen attributes Dic tab last check box (Upper/lower case)is enabled for me. please check yours.
    Siri.

  • How do I change sentences in lower case to upper case?

    How do I change sentences in lower case to upper case, and vice versa?

    Castleton228 wrote:
    I'm trying to make all my lower case copy into Upper Case, your advice worked, however, I cannot seem to save the change, or specifically copy and paste the new CAPITALISED text into another document.
    Any thoughts?
    Using Pages in iworks09
    Thanks for any tips
    Tim
    Tim,
    In that case, use Peter's second suggestion, "Wordservice".
    Jerry

  • Convert mixed case value in colum into upper case values

    Hi All,
    I have got a table call emp and has the following colums:
    id number 10
    suename_name varchar2(20)
    given_name varchar2(20)
    position varchar2(30)
    date_hired date
    Now the values in colums are mixed case and I need to change them to upper case. I think I need to use upper function to do it.
    Could anyone help me by providing me sql/pl sql script to through each colum in emp table and change them to the upper case.
    Many Thanks
    Michael

    Hi,
    If you really want to try this using PL/SQL, then you'll have to use dynamic SQL, something like this untested code, since the table and column names are vaiable:
    SET   SERVEROUTPUT  ON  SIZE 50000
    DECLARE
         sql_txt     VARCHAR2 (4000);
    BEGIN
         FOR  r  IN ( SELECT  table_name
                   ,       column_name
                   FROM    user_tab_columns
                   WHERE   data_type = 'VARCHAR2'
              --   AND     ...  -- if you don't want all columns in all tables
         LOOP
              sql_txt := 'UPDATE "'
                   || r.table_name
                   || '" SET "'
                   || r.column_name
                   || '" = UPPER ("'
                   || r.column_name
                   || '")';
              dbms_output.put_line (sql_txt || ' = sql_txt');     -- For debugging
              -- EXECUTE IMMEDIATE sql_txt;               -- For real
         END LOOP;
    END;Dynamic SQL (here) means creating a string that contains the SQL statement to be done, then using EXECUTE IMMEDIATE to run it.
    Whenever you write dynamic SQL, it's a good idea to only display the SQL statement during the early stages of debugging. When it's displaying correctly, then you can try un-commenting the EXECUTE IMMEDIATE line.
    Edited by: Frank Kulash on Jul 19, 2009 4:40 PM
    A little more complicated, but a lot more efficient:
    SET   SERVEROUTPUT  ON  SIZE 50000
    DECLARE
         sql_txt          VARCHAR2 (4000);
    BEGIN
         FOR  r  IN ( SELECT    table_name
                   ,         column_name
                   ,         ROW_NUMBER () OVER ( PARTITION BY  table_name
                                      ORDER BY       column_name
                                    )     AS column_num
                   ,            COUNT (1)     OVER ( PARTITION BY  table_name
                                    )     AS total_column_cnt
                   FROM      user_tab_columns
                   WHERE     data_type = 'VARCHAR2'
              --   AND       ...  -- if you don't want all columns in all tables
                   ORDER BY  table_name
                   ,            column_name
         LOOP
              IF  r.column_num = 1
              THEN
                   sql_txt := 'UPDATE "'
                   || r.table_name
                   || '" SET "';
              ELSE
                   sql_txt := sql_txt || ', "';
              END IF;
              sql_txt := sql_txt ||
                   || r.column_name
                   || '" = UPPER ("'
                   || r.column_name
                   || '")';
              IF  r.column_num = r.total_column_cnt
              THEN     -- This is the last row for this table; run it
                   dbms_output.put_line (sql_txt || ' = sql_txt');     -- For debugging
                   -- EXECUTE IMMEDIATE sql_txt;               -- For real
              END IF;
         END LOOP;
    END;
    {code}
    The difference is that the first solution produces and executes a separate UPDATE statement for each column, like this:
    {code}
    UPDATE "TABLE_1" SET "COLUMN_A" = UPPER ("COLUMN_A");
    UPDATE "TABLE_1" SET "COLUMN_B" = UPPER ("COLUMN_B");
    UPDATE "TABLE_1" SET "COLUMN_C" = UPPER ("COLUMN_C");
    {code}
    but it's much more efficient to do change all the columns at once, as long as you have the row in hand.  So the second solution only creates one SQL statement per table, like this:
    {code}
    UPDATE "TABLE_1" SET "COLUMN_A" = UPPER ("COLUMN_A")
               ,   "COLUMN_B" = UPPER ("COLUMN_B")
               ,   "COLUMN_C" = UPPER ("COLUMN_C");
    {code} where every line above corresponds to a row fom the query.  The first line for every table will start with
    {code}
    UPDATE "TABLE_1" SET "but all the others will start with
    {code}
    and only on the last column for a given table will the statement be executed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to query free text and how to efficiently process upper/lower case

    Hi friends,
    I'm now have two questions need your helps.
    1, i want to query free text base on oracle semantic, i tried create a Full Text Index on object like ‘CREATE INDEX di_obj_idx ON data_integration(to_char(triple.GET_OBJECT())) indextype is ctxsys.context’, but i got an error 'DRG-11304:function-based indexes are not supported by this indextype’. it seems that can't specified a column with functions. so any way for this?
    2, base on some reasons, we need to query something ignores upper/lower. of course, we can use upper/lower functions, but the performance is very low. what my question is is there any functions can be used in SEM_MATCH table function or any way can give me the higher performance?
    best regards,
    steven
    Sep 9,2009

    Hope this helps
    import java.io.*;
    public class Copy {
    public static void main(String[] args) throws IOException {
    File inputFile = new File("farrago.txt");
    File outputFile = new File("outagain.txt");
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    BufferedReader buff = new BufferedReader(in);
    String c;
    while ((c = buff.readLine()) != null)
    out.write(c.toUpperCase());
    in.close();
    out.close();
    }

  • Small caps in running heads - mixed case problem

    My running head is set to be small caps, and it picks up mixed-case text from the document. I want the head to be all 'lower case' small caps (or 'upper case', unless that really means ordinary caps) but can see no way to achieve this. Instead I get 'mixed case' small caps, if that makes any sense. If I select the head on the master page and then Type | Change Case, this has no effect on the appearance either on the master or the generated heads. How do I achieve uniform small caps where the source text for the running head is mixed-case? If small .indd attachments were allowed I would have attached one, but it got rejected despite not being llisted as a forbidden type.

    A few ways to do this:
    a script: http://jsid.blogspot.com/2005/09/script-of-day-changing-case-again.html
    or in your paragraph styles use OT small caps (assuming you're using an OT font)
    I also set up a keyboard shortcut, to Type > Change Case > lowercase
    you could probably do it with GREP too...

Maybe you are looking for