I have the following data pattern in my SQL 2005 table:
MPAN, Date, Reading1, Reading2, Reading3,......, Reading48
134, 21/05/11, , ,0.345 ,......,0.789
134, 22/05/11, , , ,......, 0.467
456, 21/05/11, , , , , 1.234
456, 22/05/11, 0.009 , , 0.534,......
223, 21/05/11, , , ,........, 3.345
223, 22/05/11, 3.223, 1.234, , , ....,0.989
For each record row there are differnt number of fields having missing data. How could I find out how many fileds have data missing for each row (group by MPAN and Date). Have had a search on Google, it seems that people suggests Stored Procedures for a similar case?
Please can you help?