From: NiGHTS <nights@unku.us>
Subject: Re: Gnatcoll SQL Question on the use of Like or iLike
Date: Sun, 26 Oct 2014 13:00:20 -0700 (PDT)
Date: 2014-10-26T13:00:20-07:00 [thread overview]
Message-ID: <cc92a615-bd78-423a-bee7-81373b039c48@googlegroups.com> (raw)
In-Reply-To: <c942e1e9-4936-4bd5-930f-5ca8af788b1c@googlegroups.com>
On Friday, October 24, 2014 7:08:50 PM UTC-4, NiGHTS wrote:
> I can't find any examples on how to use Like or iLike using the Gnatcoll Library.
>
> This is how I do a search with exact text.
>
> Query_Select := SQL_Select (
> Fields => mydb.Applications.Id_Application & mydb.Applications.Name,
> From => mydb.Applications,
> Where => mydb.Applications.Name = "test";
>
> But in this case I want to use the SQL string wildcard with case insensitive filtering.
>
> Query_Select := SQL_Select (
> Fields => mydb.Applications.Id_Application & mydb.Applications.Name,
> From => mydb.Applications,
> Where => mydb.Applications.Name ILike "%test%";
>
> That of course does not work. Also tried this:
>
> Query_Select := SQL_Select (
> Fields => mydb.Applications.Id_Application & mydb.Applications.Name,
> From => mydb.Applications,
> Where => mydb.Applications.Name.ILike("%test%");
>
> Does not work either. Any suggestions?
>
>
> Thanks in advance for your help.
I figured out how to use iLike with Gnatcoll.
use GNATCOLL.SQL;
use GNATCOLL.SQL.Exec;
Query_Select := SQL_Select (
Fields => mydb.Applications.Id_Application & mydb.Applications.Name,
From => mydb.Applications,
Where => iLike( mydb.Applications.Name, "test")
);
prev parent reply other threads:[~2014-10-26 20:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 23:08 Gnatcoll SQL Question on the use of Like or iLike NiGHTS
2014-10-26 20:00 ` NiGHTS [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox