Michael,
Saturday, October 26, 2002, 6:42:41 PM, you wrote:

MTB> I want to do:

MTB> SELECT @Rate:=Rate FROM Project WHERE ProjectID = 'x';
MTB> INSERT INTO BillingTime (Start, End, ProjectID, Rate) values (a, b, x, 
MTB> @Rate);

MTB> ... but I'm sure its doable in a single query, even if I have multiple 
MTB> values to query, is it?

MTB> INSERT INTO BillingTime (Start, End, ProjectID, Rate) SELECT a, b, x, 
MTB> Rate FROM Project where ProjectID = x;

MTB> ... but this doesn't work if I want to query values from multiple tables.

It should work. So, what exactly doesn't work?



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to