having problems with a simple query

From: "Tad Naworal" <tnaworal(at)syssrc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: having problems with a simple query
Date: 2001-05-24 15:49:54
Message-ID: sb0cf575.016@mailman.syssrc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

Thanks
Tad

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-05-24 15:53:08 Re: ERWin
Previous Message Mihai Gheorghiu 2001-05-24 15:40:22 Re: Connection from Win machine