options for query to be converted to report.

Posted on 2014-08-19
Last Modified: 2014-08-20
when the results of a query have to be transformed to a report which different people can hit/run at the same time, what the best options to capsulate the query in? (like view vs proc vs udf).. at least 2 parameters maybe part of the input from user which will be used in the query to make the report.
Question by:25112
    LVL 65

    Assisted Solution

    by:Jim Horn
    Define 'hit/run'.

    Assuming SSRS..
    If we're talking parameters, a stored procedure will work every time, and I almost always use SP's behind reports.
    Only materialized views will accept parameters, which imply a host of other side effects that may not be desired.
    No clue on the udf.
    LVL 59

    Assisted Solution

    by:Kevin Cross
    User-defined functions can take parameters; however, you may sacrifice performance depending on the type of UDF.  I agree with JIm that stored procedures are a good option.  I also use UDFs in some situations with success, so you can take that approach if you need specific functionality like JOINing the results to another table.
    LVL 27

    Accepted Solution

    I agree with JIm that stored procedures are a best option

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.‚Äč
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now