# I am new to Matillion, I want to start a SQL Script component every 04th of the month. I know this can be achieved with IF component but can someone help me how to to achieve this

**URL:** <https://matillioncommunity.discourse.group/t/i-am-new-to-matillion-i-want-to-start-a-sql-script-component-every-04th-of-the-month-i-know-this-can-be-achieved-with-if-component-but-can-someone-help-me-how-to-to-achieve-this/2348>\
**Category:** Matillion ETL\
**Created:** [December 7, 2023, 9:04am UTC](https://matillioncommunity.discourse.group/t/i-am-new-to-matillion-i-want-to-start-a-sql-script-component-every-04th-of-the-month-i-know-this-can-be-achieved-with-if-component-but-can-someone-help-me-how-to-to-achieve-this/2348 "2023-12-07T09:04:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![balapradeep.ck](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@balapradeep.ck](https://matillioncommunity.discourse.group/u/balapradeep.ck)\
**Post date:** [December 7, 2023, 9:04am UTC](https://matillioncommunity.discourse.group/t/i-am-new-to-matillion-i-want-to-start-a-sql-script-component-every-04th-of-the-month-i-know-this-can-be-achieved-with-if-component-but-can-someone-help-me-how-to-to-achieve-this/2348/1 "2023-12-07T09:04:41Z")

</div>

I am new to Matillion, I want to start a SQL Script component every 04th of the month. I know this can be achieved with IF component but can someone help me how to to achieve this

---

<div class="post-metadata">

**Author:** ![Joe-Community-Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/joe-community-manager/32/897_2.png) [@Joe-Community-Manager](https://matillioncommunity.discourse.group/u/Joe-Community-Manager)\
**Post date:** [December 7, 2023, 10:01am UTC](https://matillioncommunity.discourse.group/t/i-am-new-to-matillion-i-want-to-start-a-sql-script-component-every-04th-of-the-month-i-know-this-can-be-achieved-with-if-component-but-can-someone-help-me-how-to-to-achieve-this/2348/2 "2023-12-07T10:01:36Z")

</div>

Hello [@balapradeep.ck](https://matillioncommunity.discourse.group/u/balapradeep.ck)​

Welcome to the Matillion Community!

I wanted to share the documentation for [IF Component](https://docs.matillion.com/metl/docs/2282996/#properties) that also has a brilliant video to aid in setting this up and the functionality it has, I hope this enables you to achieve what you have explained above, if not, pop back and we can take a closer look into this for you.

Kind regards, Joe

---

<div class="post-metadata">

**Author:** ![balapradeep.ck](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@balapradeep.ck](https://matillioncommunity.discourse.group/u/balapradeep.ck)\
**Post date:** [December 11, 2023, 8:51am UTC](https://matillioncommunity.discourse.group/t/i-am-new-to-matillion-i-want-to-start-a-sql-script-component-every-04th-of-the-month-i-know-this-can-be-achieved-with-if-component-but-can-someone-help-me-how-to-to-achieve-this/2348/3 "2023-12-11T08:51:48Z")

</div>

[@JoeCommunityManager](https://matillioncommunity.discourse.group/u/JoeCommunityManager)​ , IF component document doesnt provide solution for dates, the documentation is not useful in this case.

---

<div class="post-metadata">

**Author:** ![Joe-Community-Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/joe-community-manager/32/897_2.png) [@Joe-Community-Manager](https://matillioncommunity.discourse.group/u/Joe-Community-Manager)\
**Post date:** [December 11, 2023, 11:41am UTC](https://matillioncommunity.discourse.group/t/i-am-new-to-matillion-i-want-to-start-a-sql-script-component-every-04th-of-the-month-i-know-this-can-be-achieved-with-if-component-but-can-someone-help-me-how-to-to-achieve-this/2348/4 "2023-12-11T11:41:04Z")

</div>

Hello [@balapradeep.ck](https://matillioncommunity.discourse.group/u/balapradeep.ck)​

I took your question offline and a member of our team proposed a solution, using a Query Result to Scalar to work out whether it is the right day and set a flag param accordingly.

Then test the param in the IF to decide whether to run the SQLscript component or to skip it.

I have added some further documentation for [Query Result to Scalar](https://docs.matillion.com/metl/docs/2978362/).

Please do let me know how you get on please.

Kind regards, Joe
