From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.68.57.226 with SMTP id l2mr17598167pbq.1.1414353621126; Sun, 26 Oct 2014 13:00:21 -0700 (PDT) X-Received: by 10.182.241.135 with SMTP id wi7mr1052obc.29.1414353620970; Sun, 26 Oct 2014 13:00:20 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!uq10no18098549igb.0!news-out.google.com!rp1ni3521igb.0!nntp.google.com!r10no331790igi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 26 Oct 2014 13:00:20 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.229.110.218; posting-account=wEPvUgoAAABrLeiz_LRhQ3jeEhyfWVMH NNTP-Posting-Host: 71.229.110.218 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Gnatcoll SQL Question on the use of Like or iLike From: NiGHTS Injection-Date: Sun, 26 Oct 2014 20:00:21 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:22777 Date: 2014-10-26T13:00:20-07:00 List-Id: 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") );