🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: UPPER(Memo field)

#559
From: David Jones
Date: Fri, 09 Oct 1998 00:00
33 lines
1882 bytes
Nedim Buyukmihci wrote:
> 
> 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,

Thanks for the advice. I guess that SQL has it's limitations!

My code was part of a multiple-criteria search routine, which could 
result in commands that are too long for the normal filtering methods. 
Now I know that SQL won't do the job, I can fall back on my alternative 
method of directly changing the flag field values in a DO WHILE loop, 
which works OK but is slower than the SQL UPDATE command. By the way, the 
other alternative of using xDML's REPLACE command also seems to be 
slower.

I'm still experimenting with VdB 7 and haven't yet looked at CanGetRow, 
so your sample code is of great interest.

Dave
Technical Details
Message-ID: <361E3452.2819@compuserve.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <361D8690.3544@compuserve.com> <361d1cb5.87569488@forums.inprise.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: David Jones <106510.502@compuserve.com>
Subject: Re: UPPER(Memo field)
Date: 1998/10/09
Message-ID: <361E3452.2819@compuserve.com>
X-Deja-AN: 399285156
Content-Transfer-Encoding: 7bit
References: <361D8690.3544@compuserve.com> <361d1cb5.87569488@forums.inprise.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.vdbase.data.sql