Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

Top Categories · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

want to return name from a stored procedure by its id

Apr 12 2012 12:00AM by santosh   

ALTER PROC [dbo].[getTriggerNamesbyId] 
           @id INT,
           @returnval NVARCHAR(500) OUTPUT
AS 
BEGIN 
    SET @returnval = (SELECT TriggerPointDescription 
                      FROM ClaimTriggerInfo 
                      WHERE TriggerPointID=@id ) 
    RETURN (@returnval) 
END

Above is my stored procedure but when i pass valu it give me errror such as (Msg 245, Level 16, State 1, Procedure getTriggerNamesbyId, Line 12 Conversion failed when converting the nvarchar value 'sfdajfr' to data type int.) then how it possible

Submitted under: Microsoft SQL Server ·  ·  ·  · 


santosh
286 · 0% · 148

1 Replies

  • It should be

    ALTER proc [dbo].[getTriggerNamesbyId] 
                               @id int, 
                               @returnval nvarchar(500) output 
    as 
    begin 
        set @returnval= (select TriggerPointDescription from ClaimTriggerInfo where TriggerPointID=@id ) 
        select @returnval as trigger_name
    end
    
    commented on Apr 12 2012 1:25AM
    Madhivanan
    3 · 39% · 12440

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]