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 16:06:58
Message-ID: sb0cf985.046@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 Chris Bowlby 2001-05-24 16:12:36 HP Unix 11.00 Compiler error.
Previous Message Thalis A. Kalfigopoulos 2001-05-24 16:05:09 ODBC .ini