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 ?

enter image description here

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

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -