# error query sqlcmd

**URL:** <https://forum.ansible.com/t/error-query-sqlcmd/27308>\
**Category:** Ansible Project\
**Created:** [April 17, 2018, 11:49pm UTC](https://forum.ansible.com/t/error-query-sqlcmd/27308 "2018-04-17T23:49:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christovam\_Paynes\_Si](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@Christovam\_Paynes\_Si](https://forum.ansible.com/u/Christovam_Paynes_Si)\
**Post date:** [April 17, 2018, 11:49pm UTC](https://forum.ansible.com/t/error-query-sqlcmd/27308/1 "2018-04-17T23:49:06Z")

</div>

Hi, okay?

I’m new to ansible, so understand my rookie mistakes, rsrsrs. I’m having an error interpreting my query. From what I realized the problem is in the comma, when you get into it the Ansible gives the error below.  
After adjusting this, I want to work with Jinja2 in the query.

What do I need to do to execute this query correctly?

ansible-playbook test.yml

---

<div class="post-metadata">

**Author:** ![Christovam\_Paynes\_Si](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@Christovam\_Paynes\_Si](https://forum.ansible.com/u/Christovam_Paynes_Si)\
**Post date:** [April 18, 2018, 12:07am UTC](https://forum.ansible.com/t/error-query-sqlcmd/27308/2 "2018-04-18T00:07:34Z")

</div>

If you remove all the indentation (spaces, new lines), it works.  
If you remove a portion of the indentation, errors occur on other lines, such as  
“Msg”: “Msg 102, Level 15, State 1, Server SRVBD2, Line 22 \ nIncorrect syntax near ‘CODPOA’.”

Is there a way to leave the query indented?
