Re: complex queries - Mailing list pgsql-novice

From Sean Davis
Subject Re: complex queries
Date
Msg-id b85c18438306995c313a096eb8bc237d@mail.nih.gov
Whole thread Raw
In response to complex queries  (Kumar S <ps_postgres@yahoo.com>)
List pgsql-novice
On Mar 11, 2005, at 11:45 AM, Kumar S wrote:

> bob=> select proc_exprs, proc_pval, seq_gene_symbol
> from processed_data, sequence_annotation
> where proc_pval < 0.05 AND
> processed_data.seq_anno_id =
> sequence_annotation.seq_gene_symbol;
>
>
>  proc_exprs | proc_pval | seq_gene_symbol
> ------------+-----------+-----------------
> (0 rows)
>
>
> seq_gene_symbol is in sequence_annotation table and
> its primary key is value of seq_anno_id.
>

You probably need to spend some time reading about queries in an SQL
book (many of which are online), but in this particular case, it
doesn't look like seq_gene_symbol is going to equal seq_anno_id.  It
looks like you want:

processed_data.seq_anno_id=sequence_annotation.seq_anno_id

Off-topic, but have you thought about looking at using BASE or CHADO to
keep your microarray data?

Sean


pgsql-novice by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: [GENERAL] MS Access to PostgreSQL
Next
From: "Celia McInnis"
Date:
Subject: Acccessing individual array elements form plpgsql