Re: using CAST and LIKE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Timothy Wood <timothy(at)hallcomp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: using CAST and LIKE
Date: 2002-04-15 19:46:28
Message-ID: 25925.1018899988@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Timothy Wood <timothy(at)hallcomp(dot)com> writes:
> SELECT * FROM table WHERE CAST('field' AS TEXT) LIKE '%value%';

I think you meant

SELECT * FROM table WHERE CAST(field AS TEXT) LIKE '%value%';

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hans-Juergen Schoenig 2002-04-15 19:55:54 Triggers and System Tables
Previous Message Bruce Momjian 2002-04-15 19:43:51 Re: How to Recompile Postgreqsl to increase Function-argument