Will put the code in here momentarily.Far from an expert, as I do very basic stuff, but what are your questions? I could try bouncing them off a co-worker or two.
Hah, I figured there might just be someone.Weirdest place for a SQL question but yeah throw it down.