Skip to content
Advertisement

Select specific columns from the stored procedure

I have a stored procedure in other database which is maintained by other team. Assume that it is currently returning 3 columns, and my system only needs those 3 columns but the other team can add few more columns for their own use which is causing my system to fail.

Other database SP

And below is my query, which was only expecting 3 columns from the source

Is there any way I can provide the column list?

This is what I am trying but it seems that I can’t use server name as the parameter

My whole problem is to just select required columns from the SP. SP can have many columns in future.

Advertisement

Answer

Try this:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement