Re: Query with Parameters and Wildcards

From: Ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To: landsharkdaddy <ldodd(at)landsharksoftware(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Query with Parameters and Wildcards
Date: 2009-04-27 02:12:38
Message-ID: 450092BA-41F2-4CCF-9598-9F4DF2B18FFA@rvt.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Apr 26, 2009, at 7:21 PM, landsharkdaddy wrote:

>
> I have a query that works on SQL Server to return customers that
> contain the
> string entered by the user by accepting parameters and using the LIKE
> keyword. I would like to move this to postgreSQL but I'm just not
> sure how
> to get it done. This is the query
>
> SELECT * FROM Customers WHERE FirstName LIKE @custfirst + '%';
>
> This works great on SQL Server but not on postgreSQL. Any help would
> be
> appreciated.

Why didn't it work? Any error message), or no result?
Are you expecting case-insensitivity (try ILIKE)

regards, Ries van Twisk

-------------------------------------------------------------------------------------------------
Ries van Twisk
tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS
WebORB PostgreSQL DB-Architect
email: ries(at)vantwisk(dot)nl
web: http://www.rvantwisk.nl/
skype: callto://r.vantwisk
Phone: +1-810-476-4196
SIP: +1-747-690-5133

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2009-04-27 04:54:17 Re: Query with Parameters and Wildcards
Previous Message landsharkdaddy 2009-04-27 00:21:35 Query with Parameters and Wildcards