Re: combining information from 4 tables into a fifth.

2004-08-10 Thread SGreen
I don't know about everyone else but I would build scores like this: Create an empty scores table. Make gene_name the Primary Key. Allow the other columns to be null or give them a default of 0.0. Whatever that value is will represent "no score available" (I suggest null as a score of 0 may be

Re: combining information from 4 tables into a fifth.

2004-08-10 Thread Michael Stassen
You didn't give the name of the 4th table, so I'll call it t4. I think this will do: CREATE TABLE score ( gene_name CHAR(15), score_g2d REAL, score_dgp REAL, score_pocus REAL) SELECT t4.gene_name, COALESCE(g2d.score,0), COALESCE(dgp.score,0), COAL

combining information from 4 tables into a fifth.

2004-08-10 Thread Jeroen Van Goey
Hey all, I've three tables (g2d, dgp and pocus), with a gene-name, a score and some other information: mysql> select * from dgp; ++---+--+--+++ | chr| start | stop | gene_name | score