Re: How To Exclude True Values

From: <operationsengineer1(at)yahoo(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How To Exclude True Values
Date: 2006-06-07 20:18:34
Message-ID: 20060607201834.75710.qmail@web33313.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > yields the following error:
> >
> > ERROR: schema "a" does not exist
> >
> > i tried to interpret you query and apply it to my
> > case, but, apparently, i didn't too good of a job.
> >
> > do you see the error?
>
> Hmmm... That is strange. but according to the
> PostgreSQL documentation on select you can add the
> option [AS] keyword between the table_name and
> alias.
>
>
http://www.postgresql.org/docs/8.1/interactive/sql-select.html
> [ ONLY ] table_name [ * ] [ [ AS ] alias [ (
> column_alias [, ...] ) ] ]
>
> ( select ) [ AS ] alias [ ( column_alias [, ...]
> ) ]
>
> select a.inspect_id, a.inspect_result_id,
> a.inspect_result_pass,
> a.inspect_result_timestamp
> from t_inspect_result AS a
>
> join
> (
> select
> max(t_inspect_result.inspect_result_timestamp)
> as mstamp,
> t_inspect_result.inspect_id
> from t_inspect_result
> group by t_inspect_result.inspect_id
> ) AS b
>
> on a.inspect_result_timestamp = b.mstamp
> ;

Richard,

i got the expected rewsults! now i just have to study
the query to figure out what it does. -lol-

i tried using AS, but i only did it in one place -
doh! the error message just moved to the next place i
didn't do it. i'll know better next time.

thanks for the help.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-06-07 20:25:51 Re: How To Exclude True Values
Previous Message Richard Broersma Jr 2006-06-07 20:07:36 Re: How To Exclude True Values