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 |
ranjeetsingh_6
Posting Yak Master
125 Posts |
Posted - 2006-09-08 : 05:25:13
|
HiHow i assign a stored procedure value in a variableRanjeet Kumar Singh |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-09-08 : 08:17:54
|
create proc x@a intasdeclare @s varchar(10)select @s = convert(varchar(10),@a)goexec x 5==========================================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. |
|
|
ranjeetsingh_6
Posting Yak Master
125 Posts |
Posted - 2006-09-08 : 08:44:23
|
HiI want to assign stored procedure output records into a variablefor example if my procedure is create procedure Vechileasdeclare @a1 integerselect @a1=Vid from VechiletrackI want like asdeclare @b1 integerset @b1 =exec Vechile (i want to assign exectuion value of stored procedure into variable)Ranjeet Kumar Singh |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-08 : 08:48:41
|
I think you can make a parameter in/out, such asCREAT PROCEDURE Vehicle( @Param VARCHAR(5) OUTPUT)...SET @Param = 'Peso'... use withDECLARE @p VARCHAR(5)EXEC Vehicle @p OUTPrint @PPeter LarssonHelsingborg, Sweden |
|
|
|
|
|