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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 call a stored procedure from a stroed procedure

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-06-06 : 07:33:09
i have a stored procedure from which i wantto call another storec proced (from this code example :http://www.brettb.com/SQL_Help_Random_Strings.asp)
and get its value return into a @password variable
how can i do that?

thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-06 : 08:53:37

Create PROCEDURE GeneratePassword
(
@Length int,
@Password varchar(20) output
)as
.
.

Select @password=@RandomId

In other Proceudre, use this

Declare @password varchar(10)
EXEC GeneratePassword 10, @password out
Select @password


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -