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

In Where clause String comparison

Request for help in regard to the select statement where clause Ex:(Select single name into v_name from XYZ where text = string).

String and text data types are same.

String will have only 3 char and text will have 40 char of length.

Out of 40 char I would like the where clause to search any of the 3 char and fetch the record.

Hope my question is clear and can expect help on this regards,

Thanks,

Azhar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 18, 2007 at 03:28 AM

    Select single name into v_name from XYZ where text LIKE string.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2007 at 12:44 PM

    I have tried with like in where clause, it does not work my scenario.

    I will not be comparing the complete string, only single char...in the table field.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Phani,

      The string which will be in where clause will be dynamic.

      I have tried %string%, String, +String, +String_.

      For ABAP we should use *, +, _ only.

      I have gone through the SAP Help to get the above info...

      But my requirement will not fit with this options.

      Regards,

      Azhar.

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.