# How to use a single-valued variable as an input for other variable with type Query and DataSource as MSSQL?

**URL:** <https://community.grafana.com/t/how-to-use-a-single-valued-variable-as-an-input-for-other-variable-with-type-query-and-datasource-as-mssql/26882>\
**Category:** Grafana\
**Created:** [March 5, 2020, 8:51am UTC](https://community.grafana.com/t/how-to-use-a-single-valued-variable-as-an-input-for-other-variable-with-type-query-and-datasource-as-mssql/26882 "2020-03-05T08:51:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivu034](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vivu034](https://community.grafana.com/u/vivu034)\
**Post date:** [March 5, 2020, 8:51am UTC](https://community.grafana.com/t/how-to-use-a-single-valued-variable-as-an-input-for-other-variable-with-type-query-and-datasource-as-mssql/26882/1 "2020-03-05T08:51:13Z")

</div>

Hi,  
I have a variable(suppose temp) which is a single valued.  
My requirement is to use temp value in other variable(suppose temp2) of type Query and DataSource Microsoft SQL server.  
I tried customizing the query using $ sign like below:  
**select distinct Platform from dbo.MobileCenterHealthCheck where Platform = $temp**

but it gives the error **Templating-Template variables could not be initialized: mssql: Incorrect syntax near ‘=’.**

Request you to please provide your valuable suggestions.
