Skip to Content

select statement query... !

im giving the select stmt as:

select ..... where name like 'D%'.

i want to eleminate caps lock defferentaion, so that all records with 'D' or with 'd' will be selected.

i want to include that in SINGLE LIKE only, not like this:

select ..... where name like 'D%' or name like 'd%'.

-


Kindly suggest if can b achieved.

Thanx,

Naveen VIshal

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Nov 24, 2007 at 05:05 AM

    yaar, what about the capital letter avoidance condtion..i need both 'D' as well as 'd'..

    Thanx,

    Naveen VIshal

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 24, 2007 at 04:45 AM

    Yes it could be achieved as you have decided.

    select ..... where name like 'D%' or name like 'd%'.

    Like:

    DATA: l_maktx TYPE maktx.
    
    SELECT SINGLE maktx
     INTO l_maktx
     FROM makt
     WHERE ( maktx LIKE 'D%'
     OR maktx LIKE 'd%' ).
    

    Regards,

    Naimesh Patel

    Message was edited by:

    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2007 at 04:46 AM

    Hi Naveen,

    I think If you keep 'D%' in your where clause it will consider both 'D%' & 'd%', need not to specify seperately.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 24, 2007 at 04:53 AM

    can anything like this can be done, as in the case of Contains Pattern (CP) it is done like '#D#%'.

    can u suggest for the single like stmt.

    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.