Re: having problems with a simple query - Mailing list pgsql-general

From will trillich
Subject Re: having problems with a simple query
Date
Msg-id 20010602042628.C28201@serensoft.com
Whole thread Raw
In response to having problems with a simple query  ("Tad Naworal" <tnaworal@syssrc.com>)
List pgsql-general
On Thu, May 24, 2001 at 12:06:58PM -0400, Tad Naworal wrote:
> This returns an Attribute 'acquisition' not found error
>
> SELECT trx_date,
>        store_id || rgstr_id || trx_num AS invoice,
>        substring(po_num from 1 for (position('/' in po_num) - 1)) AS po,
>        substring(po_num from (position('/' in po_num) + 1) for (char_length(po_num) - position('/' in po_num))) AS
acquisition
>        FROM SS_AHST WHERE cus_id = '410BGEHD47' AND acquisition LIKE '%A1158%' ORDER BY trx_date DESC
>
> does anyone know what I'm doing wrong

in psql, try

    \d SS_AHST

if that shows a "acquisition" field in your table then i'm
confused. (maybe it's a simple misspelling snafu?)

--
#95: We are waking up and linking to each other. We are watching. But
we are not waiting.  -- www.cluetrain.com

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: Username with a hyphen character (grant failing?)
Next
From: will trillich
Date:
Subject: Re: Re: Cant get Perl Module loaded