943,728 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 545
  • ASP.NET RSS
Feb 18th, 2008
0

stored procedure problem

Expand Post »
Hi All,

i have table with some fields. one of them is "ID".
now i want to update ID by a given number.

suppose i have 5 rows and the ID are 1,2,3,4,5.
now i want that i should pass a parameter/number to the stored procedure
let it 10
then the table should contain ID as 11,12,13,14,15 after updation.
means given number should be added to all the IDs in the table.

how can i do this using stored procedure???


THANKS IN ADVANCE
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
u4umang2001 is offline Offline
28 posts
since Nov 2007
Feb 19th, 2008
0

Re: stored procedure problem

Hi,

Create procedure adding
@number int
as
update tablename set id=id+@number

exec adding 10

Regards,
SrinivasaRao.Narra
Kongapadu.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
srinunarra is offline Offline
4 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Title: Run Asp.Net Application on a system which doesn’t have Visual Studio.
Next Thread in ASP.NET Forum Timeline: Asp compilation error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC