🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.databases
Article #158

Re: (Q): SQL-Queries

#158
From: Peter
Date: Wed, 22 Oct 1997 00:00
30 lines
1530 bytes
Benoit Chailler <benoit@ic2c.com> wrote in article
<344B6B9D.7851F65@ic2c.com>...
> 
> Heinz A. Krebs Dipl.-Ing. wrote:
> > servas!
> > i have three small questions about sql-queries:
> > 1. how can i make a case-insensitive selection? if i make the
following:
> >      SELECT titel FROM database WHERE titel LIKE '%apple%'
> >    i don't get the entries with 'Apple', but i want them all!

You already lost the functionality of any indexes by using an initial %
wildcard in your like clause. However, you can restate the like clause as 

LIKE '%[Aa][Pp][Pp][Ll][Ee]%'

This will give you all cases of 'Apple', but with much additional work by
the server.

-Peter

-- 
Peter W. DeBetta
peter@milori.com
http://www.milori.com

"Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference."
Technical Details
Message-ID: <01bcdeb0$d6b863b0$0101a8c0@ntsql>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <344B1EAD.E25@fbch.tuwien.ac.at> <344B6B9D.7851F65@ic2c.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,c6b02df51994e2b0
X-Google-Attributes: gidffff5,public
X-Google-Thread: 10de66,c6b02df51994e2b0
X-Google-Attributes: gid10de66,public
X-Google-Thread: 11301e,c6b02df51994e2b0
X-Google-Attributes: gid11301e,public
From: "Peter" <green@eggs.spam>
Subject: Re: (Q): SQL-Queries
Date: 1997/10/22
Message-ID: <01bcdeb0$d6b863b0$0101a8c0@ntsql>
X-Deja-AN: 282366582
References: <344B1EAD.E25@fbch.tuwien.ac.at> <344B6B9D.7851F65@ic2c.com>
Organization: Pagesz.net
Newsgroups: comp.lang.pascal.delphi.databases,borland.public.delphi.database.sqlservers,microsoft.public.sqlserver.programming