Open PongraczIstvan opened 9 months ago
if I use cast() for the osszeg field then it is all OK ...
const sql='select fok_tetel.fok1 FOK, cast(sum(fok_tetel.osszeg) as numeric(15,2)) osszeg from fok_tetel group by fok_tetel.fok1 ';
Man, you have no idea how much you helped me, my sincere thanks
This should also work:
const sql='select fok_tetel.fok1 FOK, sum(fok_tetel.osszeg * 1.00) osszeg from fok_tetel group by fok_tetel.fok1
Hi!
if I run the below code then I get unexpected error
const tr = await pool.getDatabase();
const sql='select fok_tetel.fok1 FOK, sum(fok_tetel.osszeg) osszeg from fok_tetel
group by fok_tetel.fok1 '; const param: any[] = []; const result = await tr.query(sql, param,true); console.log(result);
if I use min, max or avg function , then it perfect...