RE: subqueries in inserts

James <[email protected]> Mon, 7 Mar 2005 04:42:33 -0800 (PST)
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
You can do insert selects with Mckoi.  (Although I
don't think it is accurate to call the select a
'sub-select')

The proper form per Mckoi documentation is as follows:

INSERT INTO table ( col1, col2, col3 )
  SELECT id, num, description
    FROM table2
   WHERE description LIKE '11%'

So you want to remove the parenthesis around the
select.

Does the select return any rows?  I suspect you get
the null exception because no rows are returned.

Jim



---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]