How do I extract sql Avg result to vb.net?

animeonegai2

New member
Joined
Jan 17, 2007
Messages
3
Programming Experience
Beginner
can someone help me on getting the average result out from this sql statement? thanks!!

sql = "select AVG(Height * Length * Width) from Bar"
da = oledbdataadapter(sql, dbconnection)
dt = new datatable
da.fill(dt)


not sure if the above statement is correct or not
 
can someone help me on getting the average result out from this sql statement? thanks!!

sql = "select AVG(Height * Length * Width) from Bar"
da = oledbdataadapter(sql, dbconnection)
dt = new datatable
da.fill(dt)


not sure if the above statement is correct or not

The above statement will calculate the average volume of all the entries in Bar. Is that what you want?
 
Back
Top