🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

SQL AND SQL IN CODE

#937
From: Jason Ortner
Date: Wed, 03 Jun 1998 00:00
57 lines
2715 bytes
OK Guys, my confusion and frustration level just went up again.
Either because I am stupid or I can't  see beyond my nose.  I love
7.01:)

The following 2 queries are the same as far as I can tell; however the
first one, which was built in the query builder works, whereas the
other doesn't.

The first on I can select from the navigator and up pops a window with
the query as advertised.  The second I am trying to use in a form
grid.  On the second one I get the message "Invalid use of keyword
rope1 where".  I have other queries I am using that are basically the
same as the second one and they work.   I am very confused, either
there is something I am missing I need, don't need????????????

This is a sql statement built in the sql designer.
I know this has no vars. but it works exactly like I want it to.  The
reason I need vars. is the names will change each time this query is
called.

SELECT HEADFN, HEADLN, HEELFN, HEELLN, DRAWNUM, DATEOFROPE
FROM "rope1.dbf" Rope1
WHERE   (DATEOFROPE = '05/31/98')
   AND  (HEADFN like '%JASON%')
   OR   (HEADLN LIKE '%ORTNER%')
   and  (heelfn LIKE '%RUSS%')
   OR   (HEELLN LIKE '%PIAZZA%')


This is a function inside a .wfm. the reason I am not using the
variables is I was trying to eliminate things as the cause.  The
reason I need the vars. is the names will change each time the
function is called.   I have tried many different variations, so far
nothing works. ARGGGGG!!!!!!!!  Maybe I could get a job in the funny
papers.:)  BTW this is just a test form, trying to get this query
assigned to a grid for test.

Function Open
PRIVATE hdfn,hdln,hefn,heln,hdent
hdfn = "JASON                 "
HDLN = "ORTNER                "
HEFN = "RUSS                  "
HELN = "PIAZZA                "
fe = new query()
fe.sql = "SELECT HEADFN, HEADLN, HEELFN, HEELLN, DRAWNUM, DATEOFROPE;
FROM 'rope1.dbf' Rope1;
WHERE   (rope1.DATEOFROPE = '05/31/98');
 AND  (rope1.HEADFN like %JASON%);
   OR   (rope1.HEADLN like %ORTNER%);
   and  (rope1.heelfn like %RUSS%);
   OR   (rope1.HEELLN like %PIAZZA%)"
FE.ACTIVE = TRUE


--
Jason Ortner         jortnerxxppmm@onramp113.org
Technical Details
Message-ID: <6l4h4q$p493@forums.borland.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: ff5a1,2b7c5a695b91d519,start
X-Google-Attributes: gidff5a1,public
From: "Jason Ortner" <jortner@onramp113.org>
Subject: SQL AND SQL IN CODE
Date: 1998/06/03
Message-ID: <6l4h4q$p493@forums.borland.com>
X-Deja-AN: 359283561
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.vdbase.data.sql