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 |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2007-03-20 : 06:17:00
|
| Hello,I have a procedure, named ProcB, with two parameters:InPar UNIQUEIDENTIFIEROutPar UNIQUEIDENTIFIER OUTPUTI want to run this procedure from another procedure ProcA and give get the value of OutPar.How can I do this?Thanks,Miguel |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-20 : 06:22:18
|
| declare @a uniquteidentifierexec procb newid(), @a outselect @aPeter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-20 : 06:23:38
|
| [code]create proc procAasdeclare @InPar uniqueidentifier, @OutPar uniqueidentifierSet @InPar = '' -- set some input value hereexec procB @InPar, @OutPar outputselect @OutPar -- display value of o/p parameterGo[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-20 : 06:27:05
|
Woohoo! 80 seconds... Peter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-20 : 06:36:57
|
Once again out of luck... Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2007-03-20 : 10:42:30
|
| I didn't realized there was a speed competition going on in SQL Server Forums ... :-)Thank you for both answers!Miguel |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-20 : 21:38:22
|
quote: Originally posted by shapper I didn't realized there was a speed competition going on in SQL Server Forums ... :-)Thank you for both answers!Miguel
Believe me there is. It is always Peter against others. The winner gets nothing. Loser gets a  KH |
 |
|
|
|
|
|