🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #1458

Re: Should be a simple SQL query - what's wrong?

#1458
From: Robert Kersting
Date: Fri, 02 Jan 1998 00:00
34 lines
1552 bytes
try the following syntax:

.......   WHERE  fieldname LIKE   '%Mark%'

The LIKE that you have in your example is the DBase LIKE(), and it
won't work in SQL.

Rob K.




On Thu, 01 Jan 1998 23:45:28 GMT, tim@nurse.demon.co.uk (Tim Harrison)
wrote:

>Forgive me if this question seems a bit simple, but I'm new to this SQL lark.
>I'm trying to select a number of records which *contain* a certain letter in a
>field. (I have a generic "MARKERS" field set up which I use to mark records I
>want to delete, follow up etc) In vDbase 5.6 an example query condition was
>	"B" $ Table->Markers
>Can anyone suggest a corresponding SQL statement? More specifically, what's
>wrong with the statement I'm trying to use (below) in an SQL file to select
>records? This generates an "invalid use of keyword" error message.
>
>SELECT *
>FROM "C:\program files\Visual dBase\testagil\members.dbf" Members
>   FULL OUTER JOIN "C:\program files\Visual dBase\testagil\club_dog.dbf"
>Club_dog
>   ON  (Members.MEMBER_ID = Club_dog.HAND_ID)  
>WHERE LIKE("*B*",Members.Mark)
>
>Thanks in advance for your help.
>Tim
Technical Details
Message-ID: <34acd7ce.19650551@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34ad23cf.6485646@news.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,aca5405642e4aa86
X-Google-Attributes: gidff5a1,public
From: robk@usit.net (Robert Kersting)
Subject: Re: Should be a simple SQL query - what's wrong?
Date: 1998/01/02
Message-ID: <34acd7ce.19650551@forums.borland.com>
X-Deja-AN: 312259270
References: <34ad23cf.6485646@news.demon.co.uk>
Organization: None
Newsgroups: borland.public.vdbase.data.sql