<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SQL error: extra parentheses"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114755#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SQL error: extra parentheses"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114755">bug 114755</a>
              from <span class="vcard"><a class="email" href="mailto:lionel@mamane.lu" title="Lionel Elie Mamane <lionel@mamane.lu>"> <span class="fn">Lionel Elie Mamane</span></a>
</span></b>
        <pre>(In reply to Julien Nabet from <a href="show_bug.cgi?id=114755#c4">comment #4</a>)
<span class="quote">> Lionel: here are 2 questions:
> 1) I haven't found SQL ref about INSERT INTO SELECT (...)
>    I never see parenthesis around SELECT block.
> Do you think it'd be ok to remove them?</span >

Yes, removing them should be fine. Both versions should work in most DBMSs (at
least those that support subqueries). The version without parentheses is
actually "more basic SQL", while the version with parentheses is a subquery.
Just hoping it will not break another DBMS.

<span class="quote">> 2) Now about the table used for INSERT block, the sql can't succeed since
> the new table doesn't exist yet at this moment.</span >

That's weird. The code should definitely first do the CREATE TABLE and then the
INSERT.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>