SSRS - select where parameter and fixed valueSSRS 2008 report fast in test, slow in production: parameter...

Does an unused member variable take up memory?

Inorganic chemistry handbook with reaction lists

Rationale to prefer local variables over instance variables?

Unidentified signals on FT8 frequencies

Was this cameo in Captain Marvel computer generated?

Sort array by month and year

std::string vs const std::string& vs std::string_view

How spaceships determine each other's mass in space?

Is the differential, dp, exact or not?

What does *dead* mean in *What do you mean, dead?*?

Did Amazon pay $0 in taxes last year?

Why do we say 'Pairwise Disjoint', rather than 'Disjoint'?

What exactly is the meaning of "fine wine"?

How do property taxes on school district bonds work?

Should I file my taxes? No income, unemployed, but paid 2k in student loan interest

Why would /etc/passwd be used every time someone executes `ls -l` command?

Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?

Do I need a return ticket to Canada if I'm a Japanese National?

Why aren't there more Gauls like Obelix?

Why is there an extra space when I type "ls" on the Desktop?

What is Tony Stark injecting into himself in Iron Man 3?

Can Witch Sight see through Mirror Image?

Is this a crown race?

An Undercover Army



SSRS - select where parameter and fixed value


SSRS 2008 report fast in test, slow in production: parameter sniffing problem?SSRS 2012 - Dynamically change value of textbox in report headerHow to pass multi-valued characters in SSRS Report?SSRS - ERROR NUMBER:7357 while passing multiple value parameters using comma delimited string to stored procedureIs it possible to have SSRS generate report while a parameter is being typed?Why won't my subscription parameter value stick?SSRS 2014 - query running fine on management studio - report timing out - how to troubleshoot?Odd behavior with SSRS 2016 drop down parameter listSQL - Passing a Stored Procedure Variable as a Parameter in a crystal report for end users to selectReport does not display when parameter allows multiple values













0















So there is a lot of stuff about using SSRS parameters to select multiple values but nothing about using both a parameter and a fixed value using the in select statement.



So what I'm trying to do is this:



select * from table where id in (Parameter_1, 'total')


Yet when I do that it complains its can't find 'Parameter_1'.



I've gotten another report to work when its just:



select * from table where id = Parameter_2


but this this isn't good enough in this use case.










share|improve this question














bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    So there is a lot of stuff about using SSRS parameters to select multiple values but nothing about using both a parameter and a fixed value using the in select statement.



    So what I'm trying to do is this:



    select * from table where id in (Parameter_1, 'total')


    Yet when I do that it complains its can't find 'Parameter_1'.



    I've gotten another report to work when its just:



    select * from table where id = Parameter_2


    but this this isn't good enough in this use case.










    share|improve this question














    bumped to the homepage by Community 8 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      So there is a lot of stuff about using SSRS parameters to select multiple values but nothing about using both a parameter and a fixed value using the in select statement.



      So what I'm trying to do is this:



      select * from table where id in (Parameter_1, 'total')


      Yet when I do that it complains its can't find 'Parameter_1'.



      I've gotten another report to work when its just:



      select * from table where id = Parameter_2


      but this this isn't good enough in this use case.










      share|improve this question














      So there is a lot of stuff about using SSRS parameters to select multiple values but nothing about using both a parameter and a fixed value using the in select statement.



      So what I'm trying to do is this:



      select * from table where id in (Parameter_1, 'total')


      Yet when I do that it complains its can't find 'Parameter_1'.



      I've gotten another report to work when its just:



      select * from table where id = Parameter_2


      but this this isn't good enough in this use case.







      sql-server select ssrs parameter like






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 10 '18 at 9:58









      ExostrikeExostrike

      286




      286





      bumped to the homepage by Community 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 8 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Ok the problem was actually with the parameter itself.



          I had to create a new one in the query called @Parameter_1 and then set it up in the query parameter tab and delete the old one.



          Really confusing.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "182"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f214578%2fssrs-select-where-parameter-and-fixed-value%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Ok the problem was actually with the parameter itself.



            I had to create a new one in the query called @Parameter_1 and then set it up in the query parameter tab and delete the old one.



            Really confusing.






            share|improve this answer




























              0














              Ok the problem was actually with the parameter itself.



              I had to create a new one in the query called @Parameter_1 and then set it up in the query parameter tab and delete the old one.



              Really confusing.






              share|improve this answer


























                0












                0








                0







                Ok the problem was actually with the parameter itself.



                I had to create a new one in the query called @Parameter_1 and then set it up in the query parameter tab and delete the old one.



                Really confusing.






                share|improve this answer













                Ok the problem was actually with the parameter itself.



                I had to create a new one in the query called @Parameter_1 and then set it up in the query parameter tab and delete the old one.



                Really confusing.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 10 '18 at 10:13









                ExostrikeExostrike

                286




                286






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Database Administrators Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f214578%2fssrs-select-where-parameter-and-fixed-value%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Parapolítica Índice Antecedentes El escándalo Proceso judicial Consecuencias Véase...

                    How to remove border from elements in the last row?Targeting flex items on the last rowHow to vertically wrap...

                    Tecnologías entrañables Índice Antecedentes Desarrollo Tecnologías Entrañables en la...