Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 25th, 2006, 09:48 AM
Authorized User
Join Date: Sep 2006
Location: Montgomery, Alabama, USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Add Function

How do I Add 1 to a column in a stored procedure?

Alexander Nelson
Alexander Nelson
  #2 (permalink)  
Old September 25th, 2006, 10:47 AM
SQLScott's Avatar
Wrox Author
Join Date: Dec 2004
Location: Wellington, FL , USA.
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts

Uh...not quite sure what you mean. Do you want to change the column name (for example, Name to Name1) or do you want to change a value in a specific column?

Scott Klein
Author - Professional SQL Server 2005 XML
  #3 (permalink)  
Old September 25th, 2006, 11:31 AM
Friend of Wrox
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post

Not sure I understand your question, but, for example, to add one to every column value for a particular column in a table:
UPDATE yourtable
    SET yourcolumn = yourcolumn + 1
or to interpret your question another way:
SELECT yourcolumn + 1 as incrementedcolumn
FROM yourtable
What are you trying to do?

Jeff Mason
Custom Apps, Inc.

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add javascript function to taxt box control sudarsanacse .NET Framework 2.0 1 February 5th, 2007 02:22 PM
add function to custom toolbar Vince_421 Access VBA 0 May 20th, 2006 10:36 AM
Calling Javascript Function With Attributes.Add OutCaster ASP.NET 1.0 and 1.1 Basics 1 January 27th, 2006 09:53 PM
Creating a function to add a new worksheet edcaru Excel VBA 2 August 16th, 2004 01:30 PM
I.H. Beg VC++ Add Member Function n6532l Visual C++ 1 September 25th, 2003 01:25 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.