* Gnatcoll SQL Question on the use of Like or iLike
@ 2014-10-24 23:08 NiGHTS
2014-10-26 20:00 ` NiGHTS
0 siblings, 1 reply; 2+ messages in thread
From: NiGHTS @ 2014-10-24 23:08 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Gnatcoll SQL Question on the use of Like or iLike
2014-10-24 23:08 Gnatcoll SQL Question on the use of Like or iLike NiGHTS
@ 2014-10-26 20:00 ` NiGHTS
0 siblings, 0 replies; 2+ messages in thread
From: NiGHTS @ 2014-10-26 20:00 UTC (permalink / raw)
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")
);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-26 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-24 23:08 Gnatcoll SQL Question on the use of Like or iLike NiGHTS
2014-10-26 20:00 ` NiGHTS
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox