mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@@ -142,7 +142,11 @@ SELECT hostname FROM my_host WHERE region IN($region)
|
|||||||
|
|
||||||
### Using Variables in Queries
|
### Using Variables in Queries
|
||||||
|
|
||||||
Template variables are quoted automatically so if it is a string value do not wrap them in quotes in where clauses. If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
|
||||||
|
|
||||||
|
From Grafana 4.7.0, template variable values are only quoted when the template variable is a `multi-value`.
|
||||||
|
|
||||||
|
If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||||
|
|
||||||
There are two syntaxes:
|
There are two syntaxes:
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,11 @@ SELECT hostname FROM host WHERE region IN($region)
|
|||||||
|
|
||||||
### Using Variables in Queries
|
### Using Variables in Queries
|
||||||
|
|
||||||
Template variables are quoted automatically so if it is a string value do not wrap them in quotes in where clauses. If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
|
||||||
|
|
||||||
|
From Grafana 4.7.0, template variable values are only quoted when the template variable is a `multi-value`.
|
||||||
|
|
||||||
|
If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||||
|
|
||||||
There are two syntaxes:
|
There are two syntaxes:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user