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 |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-09-24 : 21:53:47
|
| Hi Tara,spirit,tdugganI tried this way also ..but its giving me error as.....Server: Msg 201, Level 16, State 4, Procedure usp_issues_dal, Line 0Procedure 'usp_issues_dal' expects parameter '@orderId', which was not supplied.declare @curRow int,@TotalRows intselect identity(int,1,1) RowNum,(SELECT order_id FROM tbl_info_master where tm_id=15)as order_id,cur_number,cur_code,cur_description,cur_to into #tempTablefrom tbl_issues where tm_id=15--select * from #temptableset @TotalRows=@@rowcount + 1 set @curRow=1while @curRow<@TotalRowsbeginexec usp_issues_dal 'select order_id,cur_number,cur_code,cur_description,cur_to from #tempTable where rownum=@curRow'set @curRow=@curRow+1enddrop table #temptable |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-09-25 : 15:37:50
|
| You are passing usp_issues_dal a character string which I guess is not whatr it wantsbeginselect @order_id=order_id,@cur_number=cur_number,@cur_code=cur_code,@cur_description=cur_description,@cur_to=cur_to from #tempTable where rownum=@curRowexec usp_issues_dal @order_id,@cur_number,@cur_code,@cur_description,@cur_toset @curRow=@curRow+1end==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|