• Here's an example on how to do it dynamic. It's not that complicated and it could become a stored procedure on itself.

    DECLARE @LastName nvarchar(100) = 'Tamburello',

    @FirstName nvarchar(100) = 'Roberto'

    DECLARE @Command nvarchar(4000)

    SET @Command = 'bcp "EXEC TEST.dbo.spTryOut @LastName='

    + QUOTENAME(@LastName,'''')

    + ', @FirstName='

    + QUOTENAME(@FirstName,'''')

    + '" queryout "D:\SQLServerResults\'

    + @LastName + @FirstName + REPLACE( CONVERT(varchar(19), GETDATE(), 120), ':', '')

    + '.csv" '

    + '-c '

    + '-CRAW '

    + '-S YourServer\AndInstance '

    + '-T '

    + '-t,'

    EXEC xp_cmdshell @Command;

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2