Data Warehousing

Technical Article

UDF: Estimating the size of a table

  • Script

In database planning and design it is essential to plan out how much HD space you are going to need to store your data. If you use BOL and do a search for "Estimating Table Size" you get three articles: - Estimating the size of a table - Estimating the size of a table with […]

You rated this post out of 5. Change rating

2006-06-21 (first published: )

514 reads

Technical Article

Pagination in stored procedure

  • Script

You recently published a script showing how to do pagination (e.g. results 20 - 30 of 100) It's also possible to do it quicker and more elegantly without having to resort to building the sql string dynamically (never a good thing IMHO). You pass in 2 parameters, @PageIndex is the first record you want (so […]

4 (2)

You rated this post out of 5. Change rating

2006-05-31 (first published: )

1,271 reads

Technical Article

Generate Add Foreign Keys statements for the table

  • Script

I was going through the painfull optimization of the database of creating better clustered indexes (not the default ones on the primary key).This operation was requiring removing all foreign keys to this table and then recreation them again.I created this script to optimize this quite tidious task.

1 (1)

You rated this post out of 5. Change rating

2006-06-08 (first published: )

740 reads

Technical Article

Source system pre-integration analysis

  • Script

Initial analysis of a new source system can be quite time consuming to manually examine tables and columns to determine which even have worthwhile values in the first place. Running this script against the current database will generate useful information for all the columns of all the tables. Details include data types with varchar lengths, […]

5 (1)

You rated this post out of 5. Change rating

2005-06-07

445 reads

Technical Article

Handle Divide by Zero in SQL Reporting Services

  • Script

Out of the box, Reporting services does not handle divide by zero conditions gracefully. There are plenty of posting on how to use the IIF() function to accomplish this, with some rather horrific looking code. In order to simplify the coding process and make the resulting expressions readable by a mere mortal, I wrote the […]

4.5 (14)

You rated this post out of 5. Change rating

2006-07-28 (first published: )

3,977 reads

Technical Article

Frequency of each field in table

  • Script

This SP will generate the frequency of each occurrence in a field or for every field in a table. The syntax isexex sp_freqall , , , , for example:exec sp_freqall utems2000_2001, null,lastname, 100would return a table (with a field name and a count) for each field in the utems2000_2001 table, except the lastname field and […]

You rated this post out of 5. Change rating

2002-10-03

226 reads

Blogs

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Off to Live 360

By

I am off to Live 360 today, on my last trip of the year....

Read the latest Blogs

Forums

Microsoft Recommendations for Update Stats?

By Brandie Tarvin

I have an application team that is insisting on daily (and for some, weekly)...

how can i tell if our db2 driver is ms or ibm or other?

By stan

i see this in the definition of a linked server on our wh sql...

normal role member to be able to view list of other role members in his DB

By Senad

Is this even possible ? Tried with grant but to no avail. [sys].[database_role_members] and...

Visit the forum

Question of the Day

A Strange Result

What does this code return in SSMS 20 from SQL Server 2019?

select '|' + CHAR(0)+'abc' + '|';

See possible answers