Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored procedure not returning data

Status
Not open for further replies.

langdondiy

Programmer
Jul 16, 2003
2
GB
I am using a Macro to call a stored procedure. It has one input and one output parameter. The stored procedure is not returning any data to the macro, however it is returning data correctly when run as a stand alone stored procedure.

If I amend the stored procedure and only have an output parameter then it functions correctly.

Any suggestions?
 
I have been using macros to call stored procedures for some time. I have never been aware of any option to return data from the procedure directly into the macro. You can report directly from the procedure when calling it from an Impromptu Stored Procedure Template. There doesn't seem to be a function in the macro SQL ODBC calls that allow it. I usually store the results of the procedure in a table (with indices) and report from that. You can do a SQLRetreive to pull data from the result table into a macro array if that's where you need to use it.

Regards,

Dave Griffin




The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Hi Dave

I alreday use a stored procedure to return data from or send data to a stored procedure. The manuals say that you can do both I just don't seem to be able to make it work. I didn't know if there was a trick to it.

The reason I need to do it this way is so that I can get the Scheduler to run reports based on request entered in a remote database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top