πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: UPPER(Memo field)

#557
From: Nedim Buyukmihci
Date: Thu, 08 Oct 1998 00:00
34 lines
1709 bytes
On Thu, 08 Oct 1998 20:44:16 -0700, David Jones
<106510.502@compuserve.com> wrote:

>I've tried to use the following SQL code in VdB 7.01, where Companies is 
>a DBF table and Contacts is a Memo field and contact is a character 
>variable with upper-case values:-
>
>UPDATE Companies SET Tempflag1=0 WHERE UPPER(Contacts) NOT LIKE 
>'%'+:contact+'%'
>
>This results in the error 'Type mismatch in expression'.
>
>However, the same code without the UPPER() function works OK but is, of 
>course, case-sensitive.

Dave,

For some reason, an 'upper(<memo field>)' field cannot be used in an
sql filter or 'where' command; need to use a canGetRow routine. The
following, which I use in a search routine to allow users to collect
records based on the contents of memo fields, I got from Bowen
Moursund as far as the essentials go:

  form.rowset.canGetRow := {|| pcSearchValue $
upper(this.fields['Notes'].value)} // 'Notes' is a memo field
  form.rowset.first()
  u = new UpdateSet()
  u.source := form.rowset
  u.destination := '\PigByte\VdB\print_stuff.dbf'
  u.append()
  form.rowset.canGetRow := null
  form.rowset.first()

Ned
Technical Details
Message-ID: <361d1cb5.87569488@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <361D8690.3544@compuserve.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,2fe72fe88314414f
X-Google-Attributes: gidff5a1,public
From: ncbuyukmihci@ucdavis.edu (Nedim Buyukmihci)
Subject: Re: UPPER(Memo field)
Date: 1998/10/08
Message-ID: <361d1cb5.87569488@forums.inprise.com>
X-Deja-AN: 399115627
Content-Transfer-Encoding: 7bit
References: <361D8690.3544@compuserve.com>
Content-Type: text/plain; charset=us-ascii
Organization: PigByte DataοΏ½
Mime-Version: 1.0
Reply-To: ncbuyukmihci@ucdavis.edu
Newsgroups: borland.public.vdbase.data.sql