🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to Find a Substring into a .DBF field with Local SQL

#224
From: Martin Cativa Gronda
Date: Sat, 02 Nov 1996 00:00
23 lines
1558 bytes
Hi All!

I need to search a substring into a field inside a .DBF file,
using Local SQL.
I have a .DBF with a 2 fields, ZipCode (longint) and StateName
(String[40]), I want to make a search for a sigle word inside the
Statename, How can I do that with SQL statemens?

For example find the record "NEW YORK" when I enter "YORK" as substring.

I tried SELECT * FROM "BASE.DBF" WHERE Statename=:VAR1

beeng VAR1 the substring, but off course that only searchs an exact
value,
I read that Local SQL supports SUBSTRING(), but I don't how to use it.

Thanks for your help  
---
                  Martin Cativa Gronda
     )|(          E-mail: moonred@satlink.com                   
    (o o)         Cordoba - ARGENTINA  
-ooO-(_)-Ooo-------------------------------------
Technical Details
Message-ID: <327BEAAA.2D5A@satlink.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,be4a8ea247772e3f,start
X-Google-Attributes: gidffff5,public
X-Google-Thread: 109585,be4a8ea247772e3f,start
X-Google-Attributes: gid109585,public
X-Google-Thread: 10baee,be4a8ea247772e3f,start
X-Google-Attributes: gid10baee,public
From: Martin Cativa Gronda <moonred@satlink.com>
Subject: How to Find a Substring into a .DBF field with Local SQL
Date: 1996/11/02
Message-ID: <327BEAAA.2D5A@satlink.com>
X-Deja-AN: 194070484
content-type: text/plain; charset=us-ascii
organization: Satlink, Argentina
mime-version: 1.0
reply-to: moonred@satlink.com
newsgroups: comp.lang.pascal.delphi.databases,comp.lang.pascal.delphi.misc,es.comp.lenguajes.delphi
x-mailer: Mozilla 3.01b1Gold (Win95; I)