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

Writing efficient select statement

Hi,

We have a function module with 11 import optional parameters. Our requirement is that even if 1 parameter is filled we have to select data based on that. If more that 1 parameter is filled we have to consider all filled parameters.

Is there any good way to do that without putting so many combinations of filled and unfilled parameters?

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 May 22, 2008 at 08:17 AM

    Hi,

    I think U can use FOR ALL ENTRIES......in the SELECT stmt for this purpose...

    It may help U out.

    Reward if helpful.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 22, 2008 at 08:16 AM

    You could use a dynamic where statement - use the F1 help on the Select statement for more information.

    Or wait for someone to cut and paste it here for you...

    Gareth.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 04:55 AM

    Using dynamic select statement solved this problem.

    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.