Results 1 to 2 of 2

Thread: increase the speed of the report

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    18

    Thumbs down increase the speed of the report

    Hello,

    I am working on a report in SQL Server Reporting Services 2000.

    Code:
    SELECT TOP 200 * FROM necc.dbo.vw_rop_report_profit_per_call
        WHERE [Call Day] = case when @callDate = '' then [Call Day] else @callDate end
    >> I have a promt for the user to enter the date.
    >> If the user does not enter any date, then the report will show all the first 200 records, without the where condition.
    >> This query is running too slow.

    To increase the speed of the report , could somebody help me build the where clause only when something is in the filters ?

    Thank you,

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: increase the speed of the report

    Try

    SELECT TOP 200 * FROM necc.dbo.vw_rop_report_profit_per_call
    WHERE ([Call Day] = @callDate Or @callDate = '')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width