I am using Self servicing model and have to write llbl code for a query like this
SELECT StartDate, MIN(Field1) AS FieldName1, MAX(Field2) FieldName2
FROM MyTable1
WHERE Field1 IS NOT NULL OR Field2 IS NOT NULL
GROUP BY StartDate
ORDER BY StartDate
The problem is that
1) The Field names like **Field1 **or **Field2 **can change
2) there ia also filter where the same fields are using.
3) The number of these fields in the query can change also. For instance in above example I have **Field1 **and **Field2 **but in some case I may have Field1, Field2, Field3, Field4
Any ideas on what is the best of implementing this type of scenario?