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

How can I use a where in Select clause?

How can I use a where in select clasue when the other part of the where I do not not.

I mean that

Select *

from mara

where MATNR = MT*

That means it can have MTA, MTB, MTC....and so on

I can I write this code.

Regards,

Subhasish

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:39 AM

    Hello.

    Use:

    SELECT * FROM mara WHERE field LIKE 'MT%'.
    

    Regards.

    Valter Oliveira.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:40 AM

    HI,

    Use LIKE MT% to get the material starting with MT (i.e. MT*).

    Reward points if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 09:45 AM

    hiii

    you can use following query

    SELECT * FORM mara WHERE matnr CONTAINING 'MT'

    or use following

    select * from mara WHERE matnr =  'MT%'

    reward if useful

    thx

    twinkal

    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.