I have 2 systems that use the same stored procedure.
The problem is that one system needs data as normal select
statement inside the stored procedure, while the other needs the data in XML format
I just looking for best practice,
OPENROWSET
?Thanks
Depends on the details of the stored procedure but as a rule of thumb I prefer to add a parameter to determine the output type. In this way you will avoid to maintain two procedures and the risk of going out of sync at some point in the future.