🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #2006

Re: Alpha searches

#2006
From: Torsten Seemann
Date: Tue, 16 Mar 1999 00:00
37 lines
1532 bytes
Hi Neil.

Use a TQuery component with a SQL statement that looks something like this:

SELECT * FROM CUSTOMER
WHERE City LIKE %an%

Regards,
Torsten Seemann

Neil Cowburn <neil.cowburn@denali.co.uk> wrote in message
news:7cmbti$klh$1@news7.svr.pol.co.uk...
>I'm having a bit of a problem trying to figure out how to do alpha searches
>in Delphi 4.
>
>The scenario is: I want to be able to search a field for all records that
>contain a particular letter or combination of letters e.g. suppose I have a
>field called "City" and I want to search the table for all cities (or city
>name, more precisely) that contain the letters "an" in that order. It must
>be case insensitive too.
>
>Example results:
>
>City
>------------
>San Francisco
>Los Angeles
>Bangor
>Manchester
>Anchorage
>... etc, etc.
>
>
>Thanks in advance, mes amis.
>Neil Cowburn.
>
>
Technical Details
Message-ID: <WmzH2.777$74.1368@news030.image.dk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7cmbti$klh$1@news7.svr.pol.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115d96,cb196d148c768f10
X-Google-Attributes: gid115d96,public
From: "Torsten Seemann" <ts@winddata.dk>
Subject: Re: Alpha searches
Date: 1999/03/16
Message-ID: <WmzH2.777$74.1368@news030.image.dk>
X-Deja-AN: 455750261
References: <7cmbti$klh$1@news7.svr.pol.co.uk>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
X-Complaints-To: news-abuse@image.dk
X-Trace: news030.image.dk 921616950 194.234.60.42 (Tue, 16 Mar 1999 21:42:30 MET)
X-MSMail-Priority: Normal
NNTP-Posting-Date: Tue, 16 Mar 1999 21:42:30 MET
Newsgroups: borland.public.delphi.database