title: From SQLServer syntax to Oracle
body: <p>I've been playing around with this query for some time now but I can't seem to make it work in an Oracle DB. I use SQLServer syntax that works with SQLServer 2008 at least (don't know about earlier versions).</p>
  
  <pre><code>INSERT INTO WELCOME_PAGE_ITEMS
  SELECT (SELECT COALESCE(MAX(ID), 0) + 1 FROM WELCOME_PAGE_ITEMS),
       'panel-' + (SELECT CAST(COALESCE(MAX(ID), 0) + 1 AS VARCHAR(20))
                     FROM WELCOME_PAGE_ITEMS),
       1,
       (SELECT COUNT(PREFERED_ORDER) + 1
          FROM WELCOME_PAGE_ITEMS
         WHERE PREFERED_POSITION = 1),
       0,
       0,
       'Custom Portlet',
       1,
       1,
       3,
       0
  </code></pre>
  
  <p>It gives me problems with the COALESCE function as well as with the string concatenation of <code>'panel'+X</code>. </p>
  
  <p>Thanks in advance</p>