Quantcast
Channel: SQL Server Data Access forum
Viewing all articles
Browse latest Browse all 4164

Query to increment a table number on 1st of every month

$
0
0

Hi,

I am trying to access some data from joining few tables and the table names are ending with number XX which do have an increment every month. lets say for this month I have the table names as TBLQuestion01, next month I have to query TBLQuestion02 and so on.

I have made a power shell script and scheduled to run every day to provide me with a report. Now, on 1st of every month I have to change the table numbers manually. How can we increment the table numbers automatically ?


Viewing all articles
Browse latest Browse all 4164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>