Skip to content
Discussion options

You must be logged in to vote

Let's assume we define a Literal Input for customer as follows:

This will allow us to use {{customer}} as a parameter in our queries.

We can now write a query as:
EXEC dbo.Test_sp @Param1 = {{customer}}

This will translate to:
EXEC dbo.Test_sp @Param1 = '<user defined value>'

So, for example, on the View page of the QueryView, you will see this input field:

If you put in foo, your query will be set to:
EXEC dbo.Test_sp @Param1 = 'foo'

If you leave the input blank, your query will be set to:
EXEC dbo.Test_sp @Param1 = ''

Now, in some cases, you may want to have NULL rather than an empty string. For that, use as the default value in the Literal Input settings.

In this case, if the user-d…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by data-usr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants