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)
 Stored Procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-03 : 10:04:35
priya writes "As I pass a string, Ex:'Hello' to a stored procedure which is retuning the same to the calling procedure.

the result contains only the first letter 'H'.Could anyone help me with this.

Here is the code.

DECLARE @doc varchar(200)
declare @n varchar(200)
set @doc='hello'

EXEC spInsert @doc ,@n OUTPUT
Select returnvalue = @n

Stored Procedure:

CREATE PROCEDURE spInsert
(
@doc varchar(200),
@n varchar(200) OUTPUT
)
AS
begin
select @n = @doc
end
GO"

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-01-03 : 10:14:21
Hi

Are you sure that this is the code you are talking about ?
This just worked perfectly for me (SQL 2000)



Damian
Go to Top of Page

lfmn
Posting Yak Master

141 Posts

Posted - 2002-01-03 : 13:58:52
I tried it in SQL Server 7 and it worked fine

cursors are like hammers - sometimes you have to use them, but watch your thumb!
Go to Top of Page

Rafiq
Starting Member

25 Posts

Posted - 2002-01-04 : 01:34:55
Hi

This code worked perfectly for me (SQL 7.0/2000)

Regards,

Rafi
Go to Top of Page
   

- Advertisement -