Hi,
I'm making a rather simple database program, with TurboDelphi. I would like to make some calculations, based on some DB data, provided by a TQuery component over ODBC.
I would like to do the following:
Count rows that were returned by the query.
The only way I found that could do this, is the RecordCount method. Is this "The Way" or is there a better one?
Count rows that have the same value on a column.
Count into one variable, numeric (real) values of one column.
I can figure out several workarounds to the two last ones, using select statements and loops, but I do have the feeling multiple SQL queries are not the most efficient way to go about this.
Anyone care to hint?
I'm making a rather simple database program, with TurboDelphi. I would like to make some calculations, based on some DB data, provided by a TQuery component over ODBC.
I would like to do the following:
Count rows that were returned by the query.
The only way I found that could do this, is the RecordCount method. Is this "The Way" or is there a better one?
Count rows that have the same value on a column.
Count into one variable, numeric (real) values of one column.
I can figure out several workarounds to the two last ones, using select statements and loops, but I do have the feeling multiple SQL queries are not the most efficient way to go about this.
Anyone care to hint?