Getting 10,000 rows of SQL code into SSRS

  • I wrote 10,000 lines of SQL (several temp tables) and i would like to move it to SSRS but i  can't copy and paste that much code.  Thoughts?

    thanks

  • Use an SP. Putting the SQL directly in SSRS is rarely a good idea.

    Also, however, I doubt that using several temporary tables is going to be the best (performing) solution.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • jeffshelix - Wednesday, April 25, 2018 7:48 AM

    I wrote 10,000 lines of SQL (several temp tables) and i would like to move it to SSRS but i  can't copy and paste that much code.  Thoughts?

    thanks

    Convert it to a stored procedure and call the stored procedure from SSRS.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thom A - i totally agree that my large temp table isnt good code, but i need Duty Rates from Customs and that table is 9500 rows long.  My company doesnt have a Table that holds them  . . . yet

    THanks

    Jeff

  • Put your code into a stored procedure, execute your SSRS report using a stored procedure.

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply