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

Can't get SQL delete statement to dissregard nulls.

Hello Everyone,

I am attempting to delete from a table a series of user inputs. Several of these inputs are not required and so I need to be able to customize my delete statement to what they input. My issue is, if I keep the non-inputed variables in my delete statement, the statement only deletes those in which it finds "NULL" in those fields. Since ABAP supports SQL nativelly, I can not parse a sql string to send in. Any help would be greatly appreciated.

Thanks,

-Alex

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 04:26 PM

    Are the inputs parameters or select-options?

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      They are input parameters that are being used in my select statement:

      DELETE FROM /BIC/ACDCO200

      WHERE CALMONTH BETWEEN TEMPDATELOW and TEMPDATEHIGH and

      COMP_CODE = TEMPCOMPCODE and

      VERSION: (Not sure if this is correct one)

      /BIC/GVERSION = TEMPVERSION and

      /BIC/DIVREP = TEMPREPDIVISION.

      subsidiary = TEMPSUBSIDIARY.

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.