SQL For .NET Programmers

Is now available as an eBook for your Kindle reader.

Get it at Amazon today!

Recent Posts
Calendar
July 2009
S M T W T F S
« Jun   Aug »
 1234
567891011
12131415161718
19202122232425
262728293031  

Archive for July 6th, 2009

SQL For Programmers – New Question

tp_vol3_007 I got this question last week that I thought would be worth discussing on the blog.

I would like to create a table that lists contributions by date, amount, and designation. In some cases one gift was split two (or more) ways. For example, a contribution of $1000 was given, and $500 went to the scholarship fund and $500 to athletics. The gift date would be the same for both gifts, but they must be recorded separately in order to split the gift. In my new table, I want to list them in rows like this:
date| amount| designation1, designation2, designation3, etc.

Would it be best to use a cursor or a stored procedure. I’ve never done anything like this before, so I’m not sure where to begin.

Read the rest of this entry »