Sqlt_data_x_x_x Table Keep Changing of Name Making Sql Querry Invalid

Hi,

I plot tag history on charts in vision. I use a sql querry to check if there is data in the data base to show or not the graph. There is the sql querry :

SELECT COUNT(*) as test
FROM sqlt_data_1_2023_04

But it seems that a new table is created with a new name at each month (sqlt_data_x_x_x), so the querry become invalid at every month.

So, is it possible to store the tag data always in the same table?

Thank you!

Sure, disable partitioning on the DB history provider:
https://docs.inductiveautomation.com/display/DOC81/Tag+History+Providers#TagHistoryProviders-DatasourceHistoryProviders

This is likely to have adverse effects on your DB performance over time, as the table row count grows, unless you have a "smarter" DB that does transparent partitioning. Consider yourself warned.