bhushanhegde
Old Hand
Points: 382
More actions
December 4, 2008 at 10:48 pm
#198534
hi,
my proc is as follows:
CREATE PROCEDURE NN
@OPT varchar(max) OUTPUT
AS
DECLARE @NUM1 INT;
DECLARE @NM VARCHAR(100)
begin
SET @NM='A';
set @NUM1=1;
WHILE @NUM1 < 10
SET @NUM1 = @NUM1 + 1
SET @OPT=@OPT+@NM
end
i am expecting out put as AAAAAAAAAA
but it IS NOT.
pls help me on this
bhushan
Mahesh Bote
SSCrazy Eights
Points: 9107
December 5, 2008 at 1:05 am
#908088
[font="Verdana"]
Try
Create PROCEDURE NN
@OPT varchar(100) OUTPUT
Select @OPT = replicate('A', 10)
Go
declare @OP varchar(15)
exec NN @OPT = @OP output
select @OP
Mahesh
[/font]
MH-09-AM-8694
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply