SQL reflection insanity