My basic approach in such cases is to try and define an API that figures out whats needed, drive that in a set based approach until it gets down to actual queries etc. but it is tricky; pick a thread and pull on it.
My basic approach in such cases is to try and define an API that figures out whats needed, drive that in a set based approach until it gets down to actual queries etc. but it is tricky; pick a thread and pull on it.