sql server - How to suppress messages returned by sqlcmd while executing stored procedure from function? -
for reason, had execute stored procedure function , since not possible , tried explained @ stackoverflow :: execute stored procedure function
instead osql, tried sqlcmd. worked multiple blank rows, rows ------ , rows null value.
this function can not changed stored procedure.
is there way suppress these messages , unwanted rows ?
or there alternative executing stored procedure inside functions ?

sql:
master..xp_cmdshell 'sqlcmd -com252\instance2008 -e -q "set nocount on; exec mydatabasename..storedprocname ''param1'', ''param2'' "' i tried pushing on temporary tables unfortunately again, temporary tables can not accessed on function.
haven't tried it, how this?
declare @dummy table(f1 varchar(max)); insert @dummy (f1) exec master..xp_cmdshell 'sqlcmd -com252\instance2008 -e -q "set nocount on; exec mydatabasename..storedprocname ''param1'', ''param2'' "'
Comments
Post a Comment