Category Archives: Uncategorized

Some Uses for Query Hints

Some of you are all set to flame me just because of my title. I know because a couple of years back, I would have probably been one of the first to say “NO!”, when anybody started talking about query … Continue reading

Posted in Uncategorized | Leave a comment

Getting the full exception from .NET

While we’re on the topic of .NET coding, here’s another technique.  If you thought my last post was short, here’s an even shorter one… Ever wanted to make sure you returned an error message with all of the inner exceptions?  … Continue reading

Posted in Uncategorized | Leave a comment

Fun with Enums and a Generic File Date/Time Stamper

Time for a break from SQL stuff for a little .NET.  Have you ever wanted to use the integer value of an ENUM instead of the actual Enum Value?  For example, here is an enum I created to map datetime … Continue reading

Posted in Uncategorized | Leave a comment

Using NTILE with Cross Reference Values to Create Dimensions

I confess  lack of depth in SQL Analysis Services (SSAS).  I’ve read quite a bit about the capabilities including data mining, and played with a couple of the wizards, but just haven’t had time to immerse deeply into end-to-end scenarios.  … Continue reading

Posted in Uncategorized | Leave a comment

Using Persisted Computed Columns in SQL Server Indexes

As part of my research work, I generate thousands of simulations on an almost daily basis for various scenarios.  One of my scenarios involves determining strategies for selecting the most profitable short and long stock entry/exit positions.  Calculating this involves … Continue reading

Posted in Uncategorized | Leave a comment

Auto-Generating Pivot Views

Coming back from the Sci-Fi world of AI, etc to some real world scenarios…  Earlier I posted a generic stored procedure that automatically unpivots data so that columns become rows.  Today, I provide the inverse capability, although not truly generic … Continue reading

Posted in Uncategorized | Leave a comment

Generating a List of Calendar Dates

For today, here’s a simple trick.  Ever need to get a list of all the calendar dates for a period?  This is very simple using a user defined function with a table.   Below is a simple version.  I have a … Continue reading

Posted in Uncategorized | Leave a comment

Dumping SQL data in pivoted format

Technorati Tags: SQL Server,Tips If you’re like me and spend a lot of time in SQL Query Analyzer, querying data directly, you may find the column display format tedious for tables with lots of columns or where you are only … Continue reading

Posted in Uncategorized | Leave a comment

SQL Data Warehousing – Tip 2 – Indexed Views

Last time we discussed the use of a period table to consolidate analysis into smaller segments of data.  This can be done for an analytical application where the details are not needed or as part of a rollup.  Today, we’re … Continue reading

Posted in Uncategorized | Leave a comment

SQL Data Warehousing Tips 1 – Building a Period table

Recently, I started a personal project for analyzing stock market trends and calculating the optimal trading strategies.  I’ve learned a lot of new stuff about LINQ and SQL 2008 from this.  Based on that I’m opening a new series on … Continue reading

Posted in Uncategorized | Leave a comment