Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return from stored procedure

Status
Not open for further replies.

raghu3

Programmer
Dec 19, 2005
96
US
what is wrong with this sp:
create procedure tstSP @ret char(10)=null OUTPUT
AS
.
.
.

SET @ret='returnval'

RETURN @ret

when I execute this, I get the following message:
Syntax error converting the varchar value 'returnval' to a column of data type int.

On debug the value of @ret is set correctly.


I don't think this is that complicated ... but I am kind of stumped!
 
There is no need for RETURN... it has different purpose in stored procs and btw. accepts only integers.

------
[small]select stuff(stuff(replicate('<P> <B> ', 14), 109, 0, '<.'), 112, 0, '/')[/small]
[banghead]
 
It does not care w/out the return. My sql connectd to ADSI via linked server, maybe there are different set of rules in this case. As I do a count(*) from ADSI, but get the ad attribute I select, this is only for validation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top