Passing parameters to a stored procedure and receive on the same line the processed value

  • Hello,

    I have this problem to solve as I'm new on T-SQL way to pass parameters through SPs.

    I simply wanted to create a library of functions and SPs to solve regular problems such as

    testing a parameter to be null or an empty string and so on.

    But I found there's no way to pass in line a value to a function and in the same line return the value after the processing.

    For ex. :

    IF iIsEmpty(@MySPInputParameter)

    BEGIN

    PRINT 'You Didn't Pass the Input Parameter.'

    END

    Is there a way to do this in T-SQL as in any other languages ?

    Thanks for any suggestions,

    Best Regards

    Paolo

  • Read about scalar functions in CREATE FUNCTION topic of BOL.

    _____________
    Code for TallyGenerator

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply