ggggg
I have a dbf file- bill.dbf .
name, endDate, value--------------------------
john,1/2/2010,25
boni,1/3/2010,75
john,8/4/2009,35
boni,2/2/2010,10
dany,12/2/2009,95I created a query that give me the latest date for each user whose value is less than 50.
I don't need the data of the rows. Just rows number returned by this command.
I tried this:
OleDbConnection connection = new OleDbConnection(connectionString);
OleDbCommand cmd1 = new OleDbCommand("Select Count(*)From(SELECT name, MAX(endDate) FROM bill having MAX(value)<50 GROUP BY name) x;", connection);
int no = Convert.ToInt32(cmd1.ExecuteScalar());
But I get a Syntax error in HAVING clause.