Custom Query

M

Matt Shudy

Hi,

I am using fp to update a access db table. Here is my sql
statement:
UPDATE Budget
SET Value='::Value::'
WHERE Location='::Location::'

I get an error when i try to verify the query. I know it
has to do with the "value", in access it is set as a
number-decimal, is there another way to say
Value='::Value::' when it is defined in access as a number-
decimal?

Thanks,

Matt Shudy
 
T

Thomas A. Rowe

Change

Value='::Value::'

to

Value=::Value::

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
K

Kevin Spencer

In the SQL language, data types are indicated by punctuation. String data
types are enclosed in quotes. Numeric data types should not be. Therefore,
your query should (probably) read:

UPDATE Budget
SET [Value] = ::Value::
WHERE [Location] = '::Location::'

.... Assuming that "Location" is a string/text data type.

Also, note the square brackets I added. I'm not entirely sure that "Value"
in particular is not a reserved word in your database product. In most
DBMS's, using the square brackets (or double-quotes in some databases)
around your database object names will indicate to the database that you are
referring to a database object rather than the reserved word.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
M

Matt Shudy

Hey Guys,

Thanks for the help. Is "Value" a reserved word? I tried
SET Value=::Value:: and got the same error message, but
changed it to SET rValue=::Value:: and that worked...

Thanks,

Matt Shudy
 
Top