Registriert seit: 24. Sep 2005
483 Beiträge
Delphi 2010 Architect
|
AW: SQL Custom Sort
6. Okt 2010, 13:22
Code:
SortColumn:=DBGrid1.Columns.Items[Column.Index].FieldName;
SortOrder:='ASC';
IBQuery1.SQL.Text:=
'SELECT FIELD0, FIELD1, FIELD2, FIELD3, '+
'cast(lpad(FIELD4, 50, '' '') as varchar(50)) FIELD4, '+
'FIELD5, FIELD6, FIELD7 from MYTABLE ORDER BY ' + SortColumn + ' ' + SortOrder;
IBQuery1.Open;
|
|
Zitat
|