Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    Delete multiple records at once

    General Discussion
    2
    3
    124
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dick Honing
      Dick Honing last edited by

      I'm trying to delete multiple records at once and for this purpose I create an SQLSELECT API with the following Source Code:

      DELETE FROM Data WHERE id IN ( @PARAM_DATA )

      If I test this with only one id, this works:

      {
      "DATA": "(8970538)"
      }

      But as soon as try multiple id's, I get an error ... Operand should contain 1 column(s).

      What might I be doing wrong? And/or is there a better approach for deleting multiple records at once?

      Thanks in advance for your help!

      Screenshot 2020-11-06 at 11.12.41.png

      1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim last edited by

        Hey,

        You wrote that your query is :

        DELETE FROM Data WHERE id IN ( @PARAM_DATA )
        

        So the computed query would be nested parenthesis no?

        DELETE FROM Data WHERE id IN ( (8970538,14361538) )
        

        Maybe try without parenthesis in the input parameters section?

        1 Reply Last reply Reply Quote 0
        • Dick Honing
          Dick Honing last edited by

          that seems to do the trick! @Wassim thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post