Hi! I want to create a table, using a select statement to fill it. Iam using a Database called Listeria_monocytogenes_EGD_int:
>From that I want to select the following: There is a table in which a code-hitcode pair is stored. I want to select a additional value (funcat) to each code and hitcode. I have a table with the columns code and funcat for each of the two Organisms (Lmono and Bsub). So I select code, funcat from the code_funcat_Lmono table where code from the code-hitcode-pairs-table (code_hitcode_blast_Bsub) matches code in the code_funcat_Lmono table. And the same for the code_funcat_Bsub table, this time using hitcode from the code_hitcode_blast_Bsub table as matching operator. Is this sytax correct or do I need to use a different one: CREATE TABLE funcat_Lmono_Bsub select b.code as Lmono_code, m.funcat as Lmono_funcat, b.hitcode as Bsub_code, s.funcat as Bsub_funcat, from code_hitcode_blast_Bsub as b,code_funcat_Bsub as s, code_funcat_Lmono as m where b.code =m.code and b.hitcode=s.code; When I am using the above command, the job runs on for a very long time, producing no result whatsoever. This is what I find when I type "show processlist;": | 133026 | klumpp | 146.107.217.41 | Listeria_monocytogenes_EGD_int | Query | 3272 | Sending data | CREATE TABLE funcat_Lmono_Bsub select b.code as Lmono_code,m.funcat as Lmono_funcat,b.hitcode as Bsu | Thanks for your help! Can I please have a copy of any answer as email? My address is: [EMAIL PROTECTED] --------------------------------------------------------------------- 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