Select Max(col name) Expr1000
- From: "Jeff Howard" <jhoward@xxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 10:23:14 -0600
I am trying to select a MAX value from a column and I have in the past added
my own temporary column to return the max value into but I could not get
that to work. I noticed that the query returned the value into a column
called expr1000. Does it always return that column name with the max value
or is there something else I should do.
MainAdoQuery.Close;
sSql := 'Select MAX ([Piece Number]) ' +
' FROM [' + MainAdoDataSet.CommandText + ']' +
' Where [Item Number] = ' + '"' + MainForm.KeyIdEdit.AsString + '"';
MainAdoQuery.SQL.Text := sSql;
try
MainAdoQuery.Open;
except
raise;
Exit;
end;
MainAdoQuery.GetFieldNames(MainForm.ListBox1.Items);
ShowMessage(MainAdoQuery.FieldbyName('Expr1000').AsString);
.
- Follow-Ups:
- Re: Select Max(col name) Expr1000
- From: Brian Bushay TeamB
- Re: Select Max(col name) Expr1000
- Prev by Date: DBF to ADO
- Next by Date: Re: MS ACCES DELPHIE MASTER/SLAVE PROBLEM
- Previous by thread: DBF to ADO
- Next by thread: Re: Select Max(col name) Expr1000
- Index(es):
Relevant Pages
|