SELECT * FROM [Stored Procedure]

Hi experts,

I hope that you can help me with this question, I am working on a multi servers (DB2 and SQL). The stored procedure will pull data from server A, then look  up value from server B through Left Outer Join.

The problem is DBA only allowing to use this EXEC dbo.spGetStaffing  '01/01/2015', '07/01/2015' only, so no CREATE/INSERT/TRUNCATE, only the SELECT statement. Attach is the DataStage job, It's easy through SSIS or datastage but as Analyst, I need to testing and I am frustrated on how to use the data from Store procedure

Please help!!

Thank you so much!
huyenbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulfreelancerCommented:
I suggest that the DBA answer your question.

He/She will at least know what that sp is supposed to do; we do not.
0
Mike EghtebasDatabase and Application DeveloperCommented:
Using this sample code, run to see if you can view the data from your proc:
SELECT * FROM OPENROWSET('SQLNCLI', 'Server=(local)\SQL2008;Trusted_Connection=yes;', 'EXEC spYourProceName')

Open in new window

change: Server=(local)\SQL2008;Trusted_Connection=yes;  and spYourProceName as required.

After the above query works (but I think the sa needs to configure it to allow such a use. So, consider buying a lunch for him or her. LOL), then try:

Select * Into #MyTemp From OPENROWSET('SQLNCLI', 'Server=(local)\SQL2008;Trusted_Connection=yes;', 'EXEC spYourProceName')

Open in new window

Now, Select * From #MyTemp

has the data you need.

Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
huyenb, do you still need help with this question?
0
huyenbAuthor Commented:
Hi Victor,

I think I can closed this question

Thank you all for helping.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.