pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ries van Twisk <pg@rvt.dds.nl>
To: landsharkdaddy <ldodd@landsharksoftware.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Query with Parameters and Wildcards
Date: Sun, 26 Apr 2009 21:12:38 -0500
Message-ID: <450092BA-41F2-4CCF-9598-9F4DF2B18FFA@rvt.dds.nl> (raw)
In-Reply-To: <23248274.post@talk.nabble.com>
References: <23248274.post@talk.nabble.com>


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@vantwisk.nl
web:   http://www.rvantwisk.nl/
skype: callto://r.vantwisk
Phone: +1-810-476-4196
SIP: +1-747-690-5133









view thread (10+ messages)  latest in thread

Message-ID: <450092BA-41F2-4CCF-9598-9F4DF2B18FFA@rvt.dds.nl>
Permalink:  ../450092BA-41F2-4CCF-9598-9F4DF2B18FFA@rvt.dds.nl/
Also on:    postgresql.org/message-id/450092BA-41F2-4CCF-9598-9F4DF2B18FFA@rvt.dds.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pg@rvt.dds.nl, ldodd@landsharksoftware.com
  Subject: Re: Query with Parameters and Wildcards
  In-Reply-To: <450092BA-41F2-4CCF-9598-9F4DF2B18FFA@rvt.dds.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox