Skip to Content
author's profile photo Former Member
Former Member

Convert both parameter and table value to Upper case in Select statement

I have a select statement with where clause. I want to make it not case sensitive. I want to able to convert the value coming form table to upper case and compare it against the parameter that is converted to upper case.

Can some one please give me syntax for that. I know in ABAP there is TRANSLATE statement but I am not sure how to use it in Where clause.

Ex:

WHERE UPPERCASE(fieldName) like UPPERCASE(parameter)

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:00 PM

    HI,

    You can use translate statement .

    Thanks,

    Sriram Ponna.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:00 PM

    You either have to use native SQL to do this or find another field in the table that is not case sensitive.

    What table and field are you looking at?

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:00 PM

    Ravi,

    In domain, see if the flag LOWER CASE is flagged.

    If this indicator is set, upper case and lower case are distinguished when you enter values with screen masks.

    Otherwise all the letters entered will be converted to upper case when you enter values with a screen mask.

    This mechanism is in effect for all the fields referring to this domain.

    Hope this helps

    Vinodh Balakrishnan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:07 PM

    Hi

    U can only translate the value before selecting the data:

    TRANSLATE <FIELD> TO UPPER CASE.

    But you can't do it while selecting the record, so

    TRANSLATE <FIELD> TO UPPERCASE.

    SELECT * FROM <TABLE> WHERE FIELD = <FIELD>

    But you're sure the table field has only uppercase string.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.