Inspecting Data in SQL Tables


When importing a flat file provided by a client into a SQL table the data in the file is often a bit of a mess and it can be easier to import all the columns as long strings into a loading table and to then try and figure out the formats and datatypes from there.

To that end below is a stored procedure for analysing the columns in a specified table. This provides min and max column lengths as well as if the column has any nulls and the number of populated and distinct values.

Read more …

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s