Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Question Unanswered: Oracle Urgent - how to get only the upper case data

    hi, I need to know how to get only the upper case currency from a table using oracle.
    e.g:- data for currency will be as followsUSD
    AUD
    EUR
    SGD
    AUd
    uSD
    EuR

    I need to get only the upper case currency among all the other currency such as
    USD
    AUD
    EUR
    SGD

    what is the logic need to be used ?

    Thanks in advance.

  2. #2
    Join Date
    Nov 2008
    Posts
    2
    Hi,

    I have found the answer by myself

    select Currency_desc from tablename where upper(Currency_desc)=Currency_desc

  3. #3
    Join Date
    Dec 2008
    Posts
    5

    Thumbs down only upper case

    I think you can find it here

    select col_name from table_name
    where col_name=upper(col_name);

    that's it.

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    You might want to look at fixing your data. set a unique index on the column and a check constraint that will force the currency code to always be in uppercase.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Dec 2003
    Posts
    1,074
    Or force it uppercase in the table trigger. --=cf

  6. #6
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Or, khm, jam the Caps Lock key on the keyboard

  7. #7
    Join Date
    Jul 2008
    Posts
    11
    example that your have following word
    uSa
    Asf
    euro
    then u can apply following Query for upper case that is

    select upper('field name') from ('table name');

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •