Categories
SQL

A Quick Solution for ‘INSERT statement exceeds the maximum allowed number of 1000 row values’

If you’re building a large INSERT statement using VALUES, you might find yourself hitting the limit of 1000 rows, for example: INSERT statement exceeds the maximum allowed number of 1000 row values Folks may tell you there are better ways to solve the issue, but the likelihood is that you’re doing it this way for a particular reason. […]

Categories
SQL

How Many Rows Are In That Table?

A question I ask myself often when exploring unfamiliar data sets. So here’s a quickie: If you’re in need of a quick measuring stick, this should do the job. Microsoft does note that the row_count field is an approximate value in this DMV. It’s taken from the internal table PARTITIONCOUNTS which can be cached, but […]