Link to home
Start Free TrialLog in
Avatar of PUMASOFT
PUMASOFT

asked on

CREATE VIEW FROM RESULTS OF STORED PROCEDURE

IS IT POSSIBLE (IF SO WHAT IS THE SYNTAX) TO CREATE A VIEW ON THE RESULTS OF A STORED PROCEDURE IN SQL SERVER 2000?
ASKER CERTIFIED SOLUTION
Avatar of xenon_je
xenon_je

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PUMASOFT
PUMASOFT

ASKER

Thanks for your input.

I have already looked at the possibility of functions, however the sp uses temporary tables and according to the help, functions cannot use temporary tables.
I just tired and sure enough it don't work.  So what are you trying to do?  There may be another way to get the results that you are looking for.

SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Bit of a long story, but in summary,

We have transferred a very legacy ISAM database to SQL - without looking at the database design or datbase access (I dont need to expand on that one). SQL Server is doing its best to pretend it is ISAM. This has resulted in very poor performance through our cobol app (what a surprise).

The SP is an attempt to convert a COBOL program to an SP and then make the values available through CRYSTAL reports, in an easy format that the users can use without training.

I advocate that the users use crystal to look up to the stored procedure (not a view) but this is deemed to be too difficult for them.

My personal viewpoint is the we either need to redesign some elements of the database/application and/or retrain users.

I also think that the view from a sp (passing parameters) is impossible in a simple method that users can use - but I have to prove it.
Then you do not need view.
Just use SP with parameters...for CR.
If you use crystal reports, than you can set as the datasource for the report a stored procedure. Doesn't this help you?
xenon
I haven't spent much time in Crystal, but can't you create stock reports that are already attached to the stored proceudres then programicly prompt the user for the vars?

That would seem to solve the problem.  You don't have to do anything with the stored procedures you just tweak the UI a bit.  

If nothing else you could write a VB "Report" engien that you would run your reports through.  depending on the reports you could dynamicly generate a paramiter entry screen and prompt the users for the information.

But, (shrug) I would do something like that.
PUMASOFT:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.