On 6/10/07, Stroller <[EMAIL PROTECTED]> wrote:
> Under AR > Customers > Reports > Search, I get the following error if
> I try to search by street name.
>
> I assume this is a known issue & not unique to my installation, but I
> send it just in case it's otherwise.
>
> Stroller.
>
>
>
> DBD::Pg::st execute failed: ERROR: column "street" does not exist
> Error!
>
>
> SELECT ct.*, b.description AS business,
> e.name AS employee, g.pricegroup,
> l.description AS language, m.name AS manager
> FROM customer ct
> LEFT JOIN business b ON (ct.business_id = b.id)
> LEFT JOIN employee e ON (ct.employee_id = e.id)
> LEFT JOIN employee m ON (m.id = e.managerid)
> LEFT JOIN pricegroup g ON (ct.pricegroup_id = g.id)
> LEFT JOIN language l ON (l.code = ct.language_code)
> WHERE 1 = 1 AND (lower(ct.address1) LIKE '%street%' OR lower
> (ct.address2) LIKE ''%street%'') ORDER BY name ASC
> ERROR: column "street" does not exist
OK, two things:
1. why don't you use ILIKE instead of LIKE and you can forget about
case (and that OR clause that's giving you the error).
2. your problem is in the second "%street%". Change the double
quotes to single quotes and the error will go away.
Ciao,
David A. Bandel
--
Focus on the dream, not the competition.
- Nemesis Air Racing Team motto
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel