Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
zippy
Yak Posting Veteran
69 Posts |
Posted - 2001-09-24 : 07:12:59
|
Hi,I am trying to write a stored procedure which will query my database based on a value I input.If a recordset is returned I want it to add one of the values with another value that is inputed(?) and then update it.If no recordset is returned I want it to insert a new row in the table with the values given.ie.Input values:PersonIDNumberResultsif rs.eofinsert blah blah blahelseupdaate blah blah blahI know how to insert data to the sp and manipulate it with if else etc. but what I don't know is how to deal with returning a recordset inside the sp, how is the data handled? how do you put it into a variable? how do you add values? etc.Can anyone enlighten me on this?Thanks a bunch Check out the worlds fastest computers at http://www.ocgurus.com |
|
|
dogli
Starting Member
32 Posts |
Posted - 2002-12-06 : 16:52:11
|
| Hi Zippy,I know this is a very old topic. But I have the same problems as you have met before. Can you tell me what's article?What I want to do is query a table, and then store some of the record in local variable, and use these varibale in other queries in the same stored procedure.Can anybody give me some ideas?I really appreciate your help! |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
|
|
|
|
|