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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-10-31 : 10:27:33
|
| Shumaila writes "I know we can retrive and insert rows (Recordset) from two differnt tables inside a stored procedure but is it possible to move through those record and perform some calculation before inserting into the other table. (I need it because i am doing some calculation and want to use if else statements). Is it possible? I need to do it within a store procedure. I don;t have any front end (client) for that. The query for retrieving and inserting witin the same sp into two different tables is CREATE TABLE #Authors (au_id char(11))INSERT #AuthorsEXEC GetStateAuthors @State='UT'SELECT *FROM #AuthorsDROP TABLE #AuthorsCREATE PROCEDURE GetStateAuthors ( @State char(2) )ASSELECT au_idFROM authorsWHERE State = @StategoI have taken this example from graz article http://www.sqlteam.com/item.asp?ItemID=2644" |
|
|
|
|
|