# How to reference a parameter in a SQL Server source step

**URL:** <https://community.synatic.com/t/how-to-reference-a-parameter-in-a-sql-server-source-step/241>\
**Category:** Flows\
**Tags:** helper-functions\
**Created:** [June 1, 2022, 3:14pm UTC](https://community.synatic.com/t/how-to-reference-a-parameter-in-a-sql-server-source-step/241 "2022-06-01T15:14:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![navessa](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.synatic.com/navessa/32/58_2.png) [@navessa](https://community.synatic.com/u/navessa)\
**Post date:** [June 1, 2022, 3:14pm UTC](https://community.synatic.com/t/how-to-reference-a-parameter-in-a-sql-server-source-step/241/1 "2022-06-01T15:14:47Z")

</div>

Illustrated below is an example of a Buffer as a source step, a Calculator step and SQL Server as a source step in a sub-flow. In this example, the data in the buffer are table names that will be used in the SQL Server source step.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/7f6aa7c9b3352c37c6deea5f066e46335bbbfde5.png)

The below image is the code in the Calculator step before the sub-flow; where a record (BufferName aka SQL Server table name) from the buffer source is converted to a parameter.

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/5cdcdf7430cecfed41af2a834cc00e10da99da7e.png)

In the below image, ‘ **{@TableName}** ’ is used in the SQL query to reference the parameter and use the selected value/ SQL table name. At the bottom of the step in the Input Parameters section, the TableName parameter is referenced with the field it’s pulling the value from (BufferName).

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/2X/a/a4c5490c8c6430479d09afc5a1282dca6b8c94ae.png)

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/0d10296939e7911ee111b3199a2cd0cbb88b2b02.png)

The below images is an example on how you can **reference an Input Parameter** in a flow.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/2X/f/ff98dd1d64cfea685646461d212c65160ab08fc5.png)

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/2X/6/6f79c14d477df13bff37f4d27aa24b2ae119834d.png)

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/2X/a/a92446ffac0b223d83d1486fa938766e1d7413cc.png)
