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 |
|
Dave_007
Starting Member
15 Posts |
Posted - 2008-06-12 : 23:46:36
|
| Hi,I want to use the output of the sp_executesql to update a coulmn in the table.example-first i run the below to get outputexecute sp_executesql @Query, @returnedCount output-then I want to use that output to update another coulmn in the tableupdate tableName set coulmn=@returnedCountI am new to this and cannot figure out how. Can someone please guide me?thank you!! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-13 : 00:20:40
|
| Where's the parameter definition. You need to first define parameters to be passed to query including OUTPUT parameter and then give the values. Likeexecute sp_executesql @Query,@ParamDefinition,@Param1=@Variable1/value1,@Param2=@Variable2/Value2,..@OutputParam= @returnedCount OUTPUTand then use itupdate tableName set coulmn=@returnedCount |
 |
|
|
|
|
|