I need to write a select that pulls all of the rows from a data table but the problem is that I need to get the rows three at a time.
I am querying SharePoint data and since SharePoint only allots so many fields per record per data type, my list has three rows for every list item. So in order to sum fields 1-31 of loat data I actually need to grab row instance 0, 1, and 2.
For each list item field float 1-12 holds 1-12 in row instance = 0 and float 1-12 holds 13-24 in row instance = 1 and float 1-7 holds float data for 25-31 in row instance = 2. The field name of the row instance is . I need to sum fields float1-float12
for the three rows and get one total.
Normally I would use something that summed the 12 float fields and assign it to one variable field to be returned in the select. But I have to loop through the three rows to get that for each and then sum the subtotals of the three rows adn repeat
Can anyone give me a pseudo code for the select? I am just not that fancy with SQL I guess.
You can assume that there are always exactly 3 rows for each item whether or not there is data in any of the given fields. If the field has no positive data it is recorded as NULL in the field.
Thank you in advance to any with ideas.
View Complete Post