i wanna ask about MAX or MIN sql database for calculating method SAW(Simple additive weighting)
koneksi.metodesaw.CommandText:='SELECT MAX(C1) AS maxc1, MAX(C2) AS maxc2, MIN(C3) AS minc3,MIN(C4) AS minc4, MAX(C5) AS maxc5 FROM metodesaw';
but im using delphi10 and "commandtext" is not work..
my plugin is MyDAC..
i dont know alot about delphi program, and this is my first time.. this is very complicated using MAX and MIN..
and this is math for Method SAW :
dm.tbnilai.active:=false;
dm.tbnilai.commandtext:='Select * from nilai order by id_nilai asc';
dm.tbnilai.active:=true;
while not dm.tbnilai.eof do
begin
v:=((dm.tbnilai['C1']/m1)*bt1)+ ((dm.tbnilai['C2']/m2)*bt2)+((dm.tbnilai['C3']/m3)*bt3)+((dm.tbnilai['C4']/m4)*bt4)+((dm.tbnilai['C5']/m5)*bt5);
dm.tbhasil.Append;
dm.tbhasil['id_peserta']:= dm.tbnilai['no_peserta'] ;
dm.tbhasil['hasil']:= formatfloat('#,##0.000',v);
dm.tbhasil.post;
dm.tbnilai.next;
end;
i dont know if this is true, if someone can solve my problem please help me
CommandText
itself, or usingMIN/MAX
in theCommandText
? Please clarify.