Hi,

Following UPDATE statement is giving "Syntax error":

UPDATE DataFileTemp ;
SET ;
Value = ROUND(Value, 0), ;
Shares = ROUND(Shares, 0) ;
WHERE ALLTRIM(Fund) in (SELECT ALLTRIM(Code) FROM cFunds)

I think reason is 'Value' field. 'Value' is keyword. If I remove 'Value'
line, statement works fine. How can I update 'Value' field in this scenario?

Kamran

Re: UPDATE-SQL problem with keyword (VFP7 SP1) by Cindy

Cindy
Mon Oct 23 19:39:34 CDT 2006

Hi Kamran,

Try it this way:

Create Cursor DataFileTemp ;
(Value Y, Shares Y)
Insert into DataFileTemp Values (1.5, 2.5)

UPDATE DataFileTemp ;
SET ;
DataFileTemp.value = ROUND(DataFileTemp.Value, 0), ;
Shares = ROUND(Shares, 0)
Browse


--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@cindywinegarden.com


"Kamran" <k_a_@ka_.com> wrote in message
news:ezLSvSt9GHA.1172@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> Following UPDATE statement is giving "Syntax error":
>
> UPDATE DataFileTemp ;
> SET ;
> Value = ROUND(Value, 0), ;
> Shares = ROUND(Shares, 0) ;
> WHERE ALLTRIM(Fund) in (SELECT ALLTRIM(Code) FROM cFunds)
>
> I think reason is 'Value' field. 'Value' is keyword. If I remove 'Value'
> line, statement works fine. How can I update 'Value' field in this
> scenario?
>
> Kamran
>