Re: complex queries

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Kumar S <ps_postgres(at)yahoo(dot)com>
Cc: pgsqlnovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: complex queries
Date: 2005-03-11 17:53:06
Message-ID: b85c18438306995c313a096eb8bc237d@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Celia McInnis 2005-03-11 22:31:08 Acessing array element from plpgsql
Previous Message Brian Gunning 2005-03-11 17:52:28 Re: [JDBC] MS Access to PostgreSQL