Re: having problems with a simple query

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: having problems with a simple query
Date: 2001-06-02 09:26:28
Message-ID: 20010602042628.C28201@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)serensoft(dot)com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2001-06-02 12:07:05 Re: Re: Cant get Perl Module loaded
Previous Message will trillich 2001-06-02 09:22:07 Re: Username with a hyphen character (grant failing?)