How exactly would I write this query, my table name being FOOD and field being HITS.

>>> Robert Hinojosa <[EMAIL PROTECTED]> 09/08/00 12:39PM >>>

Try This

UPDATE Products                                                 
SET ProdCount = (ProdCount+1)

HTH,

Robert

-----Original Message-----
From: Jeremy Toevs [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 08, 2000 12:58 PM
To: [EMAIL PROTECTED] 
Subject: Numeric Field


Is there a way to write a query that will add 1 to a numberic field in a
database? Meaning everytime the query is ran, it adds 1 to the current
number that is in the database. (example: if the database says 3 and I run
the query it will then say 4).

This may be a dumb question but it doesn't hurt to ask.

Thanks
Jeremy

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/ 
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------_=_NextPart_001_01C019CC.8AAEC54A
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: Numeric Field</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Try This</FONT>
</P>

<P><FONT SIZE=3D2>UPDATE Products =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>SET ProdCount =3D (ProdCount+1)</FONT>
</P>

<P><FONT SIZE=3D2>HTH,</FONT>
</P>

<P><FONT SIZE=3D2>Robert</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Jeremy Toevs [<A =
HREF=3D"mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Friday, September 08, 2000 12:58 PM</FONT>
<BR><FONT SIZE=3D2>To: [EMAIL PROTECTED]</FONT>
<BR><FONT SIZE=3D2>Subject: Numeric Field</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Is there a way to write a query that will add 1 to a =
numberic field in a database? Meaning everytime the query is ran, it =
adds 1 to the current number that is in the database. (example: if the =
database says 3 and I run the query it will then say 4).</FONT></P>

<P><FONT SIZE=3D2>This may be a dumb question but it doesn't hurt to =
ask.</FONT>
</P>

<P><FONT SIZE=3D2>Thanks</FONT>
<BR><FONT SIZE=3D2>Jeremy</FONT>
</P>

<P><FONT =
SIZE=3D2>---------------------------------------------------------------=
---------------</FONT>
<BR><FONT SIZE=3D2>Archives: <A =
HREF=3D"http://www.mail-archive.com/[email protected]/" =
TARGET=3D"_blank">http://www.mail-archive.com/[email protected]/= 
</A></FONT>
<BR><FONT SIZE=3D2>To Unsubscribe visit <A =
HREF=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dli= 
sts/cf_talk" =
TARGET=3D"_blank">http://www.houseoffusion.com/index.cfm?sidebar=3Dlists= 
&body=3Dlists/cf_talk</A> or send a message to =
[EMAIL PROTECTED] with 'unsubscribe' in the =
body.</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C019CC.8AAEC54A--
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/ 
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to