# Check DB vs tag values, run update if different or

**URL:** <https://forum.inductiveautomation.com/t/check-db-vs-tag-values-run-update-if-different-or/75027>\
**Category:** Ignition\
**Tags:** database, ignition81, vision, scripting\
**Created:** [June 14, 2023, 3:02pm UTC](https://forum.inductiveautomation.com/t/check-db-vs-tag-values-run-update-if-different-or/75027 "2023-06-14T15:02:08Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 14, 2023, 7:34pm UTC](https://forum.inductiveautomation.com/t/check-db-vs-tag-values-run-update-if-different-or/75027/5 "2023-06-14T19:34:14Z")

</div>

> [@rfolkes](#):
>
> Using script tool to test it appears that data1 != data2 comparison works maybe because they are both returning single row datasets?

I assure you that it doesn't work the way you might think it does.

> [@Datasets not equal but no differences found?](https://forum.inductiveautomation.com/t/datasets-not-equal-but-no-differences-found/68733):
>
> I have to rewrite some stored procedures so I am writing a test to make sure for every input I am getting the same output. I have something like from com.inductiveautomation.common.util import DatasetTestUtils def testSP(): orig\_call = system.db.createSProcCall('orginalSP') system.db.execSProcCall(orig\_call) new\_call = system.db.createSProceCall('newSP') system.db.execSProcCall(new\_call) orig\_data = orig\_call.getResultSet() new\_data = new\_call.getResultSet() compar…

You can use wildcards at the folder level, and then filter from there to insure that the tag which triggered the event is one you care to work on.

---

_[View the full topic](https://forum.inductiveautomation.com/t/check-db-vs-tag-values-run-update-if-different-or/75027)._
