🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Using a variable replacement in SQL

#513
From: Bob Knapp
Date: Fri, 04 Sep 1998 00:00
47 lines
1946 bytes
Dear Christopher,

   Thank you for your attempt to solve this problem. The result of the method
suggested produced +TEMP1+ and +TEMP2+
as the actual values for  VALUE1 and VALUE2 rather than their contents.

Only the method submitted by Romain Strieff worked.

Thanks Again,
Bob Knapp


Christopher F. Neumann wrote:

> Try,
>
> UPDATE DATA1.DBF SET VALUE1=" + TEMP1 + " WHERE VALUE2=" + TEMP2 + "
>
> the last + " might not be needed.
>
> --
> Christopher F. Neumann
>
> "Failure is not an option!"
>
> Bob Knapp <nectel@erols.com> wrote in message 35ED6C73.CA7B92E@erols.com...
>
> >I am trying to perform the UPDATE function with SQL in dbase 7.01. What
> >I would like to do is replace all values in a field when a match is
> >made.
> >
> >The problem is this: In the real world '1000' and 'TEST' are being sent
> >in as variables and changed all the time.
> >
> >If I set these values to variables it won't work .  ie. TEMP1 = '1000'
> >,  TEMP2 = 'TEST'
> >
> >        UPDATE DATA1.DBF SET VALUE1=TEMP1 WHERE VALUE2=TEMP2
> >
> >
> >I  even tried to use &TEMP1 and &TEMP2 as well as '&TEMP1' and '&TEMP2'.
> >
> >Nothing seems to work and there is little or no information on how to
> >use SQL with a variable replacement.
> >
> >What is the secret syntax, or does visual dbase not support common SQL
> >language.
Technical Details
Message-ID: <35EFD1EC.DD73C64A@erols.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35ED6C73.CA7B92E@erols.com> <6sjuc7$fq110@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,3529dd9d0cb9d0ba
X-Google-Attributes: gidff5a1,public
From: Bob Knapp <nectel@erols.com>
Subject: Re: Using a variable replacement in SQL
Date: 1998/09/04
Message-ID: <35EFD1EC.DD73C64A@erols.com>
X-Deja-AN: 387809243
Content-Transfer-Encoding: 7bit
References: <35ED6C73.CA7B92E@erols.com> <6sjuc7$fq110@forums.borland.com>
To: "Christopher F. Neumann" <CFNeumann@AOL.com>
Content-Type: text/plain; charset=us-ascii
Organization: NecTel
Mime-Version: 1.0
Newsgroups: borland.public.vdbase.data.sql