In my table I want to know the number of fields that are not null, and return that number. Is there an easy way to do this?
select count(myfield)<BR> from mytable<BR> where myfield is not null
I should remember to wake up fully before posting...<BR><BR>I have a recordset returned already. I want to know how many of these Fields are not NULL.
Try this...<BR>For Each FLD In RS.Fields<BR> If Not IsNull(FLD.Value) Then<BR> FldCount = FldCount + 1<BR> End If<BR>Next<BR><BR>That would tell you the count for the first row...<BR><BR>.d
loop through your resultset and test for null for the fields you are looking for and do your processing accordingly. <BR><BR>
I was not sure if their was an easy solution, ie. fields.count type thing.