Re: how to return a string from an Stored Proc

From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 10/04/04


Date: Mon, 4 Oct 2004 11:35:48 -0500

I suggest you read the topic CREATE PROCEDURE in SQL Server Books Online.
There are details on how to use an OUTPUT parameter along with syntax &
examples.

In this case the error suggests you are either using a wrong datatype for
the output parameter or the return value. Execute the procedure like:

DECLARE @v VARCHAR(255)
EXEC hellotest @v
SELECT @v

-- 
Anith 


Relevant Pages

  • Re: sp_password
    ... You can find the syntax for xp_cmdshell in SQL Server Books Online or at ... Technical Writer, SQL Server Books Online ... "Leon Parker" wrote in message ...
    (microsoft.public.sqlserver.security)
  • Re: keeping duplicates with certain associated fields
    ... Refer to SQL Server Books Online for syntax of a SELECT statement ...
    (microsoft.public.sqlserver.programming)
  • Re: foreign key constraint without database diagram
    ... Refer to SQL Server Books Online for more details for syntax & examples. ...
    (microsoft.public.sqlserver.programming)
  • Re: Replace function problem
    ... > Looks like you got the syntax wrong. ... See SQL Server Books Online for more ...
    (microsoft.public.sqlserver.programming)
  • Re: stored proc code always returns null?
    ... Hi Brian, ... This is the syntax you might need. ... you could also use an output parameter. ... (Remove _NO_ and _SPAM_ to get my e-mail address) ...
    (microsoft.public.sqlserver.programming)