Sub-selects in a insert statement - is it possible to rewrite?

2001-06-25 Thread Andreas D. Landmark
As I've understood it mysql doesn't support sub-selects inside for example insert statements (apart from inset ... select). Background-stuff: What I'm working on is parsing logfiles and inserting them into a mysql database through the C API, to minimize traffic and to maximize time, I was

RE: Sub-selects in a insert statement - is it possible to rewrite?

2001-06-25 Thread Chris Bolt
This is how I'd like the query to work: insert into host (host_id, host_IP) values ((select from mail mail_id where mail_addr = [EMAIL PROTECTED]), '127.0.0.1') Try: insert into host (host_id, host_IP) select mail_id, '127.0.0.1' from mail where mail_addr = '[EMAIL PROTECTED]';