Aug 30, 2006 #1 dpaulson Programmer May 7, 2000 347 CA Is there a way to issue an update query that can do simple arithmetic to a value that is in the database? For example strSQL = "UPDATE Table SET Field = Field + 1" David Paulson
Is there a way to issue an update query that can do simple arithmetic to a value that is in the database? For example strSQL = "UPDATE Table SET Field = Field + 1" David Paulson
Aug 30, 2006 #2 gmmastros Programmer Feb 15, 2005 14,910 US Yes. With the example you show, every 'field' value should have 1 added to it. If the value is NULL, it will stay NULL. As far as I know, that query should work with Access, Microsoft SQL Server, and probably many other databases. -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom Upvote 0 Downvote
Yes. With the example you show, every 'field' value should have 1 added to it. If the value is NULL, it will stay NULL. As far as I know, that query should work with Access, Microsoft SQL Server, and probably many other databases. -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
Aug 30, 2006 Thread starter #3 dpaulson Programmer May 7, 2000 347 CA Thanks gmmastros I could swear that I had already tried that, but I just checked in visdata and it does indeed work. David Paulson Upvote 0 Downvote
Thanks gmmastros I could swear that I had already tried that, but I just checked in visdata and it does indeed work. David Paulson