I need to insert new first column counter
1
2
3
4
5
6..etc in this code
- String saveStaff = " Select roba as 'Naziv artikla', SUM (cast(kolicina as float)) as 'Kolicina' from (select roba, kolicina from mp_racun_roba union all select roba, kolicina from mp_faktura_roba) as alltables group by roba";

Shahriar NikkhahRank #248 · 10.1K reputationPosted Apr 21, 2018, 7:55 AM EDT
Sai SherlekarRank #1,392 · 1.2K reputationPosted Apr 21, 2018, 1:30 AM EDT
Goran BibicRank #993 · 2K reputationPosted Apr 21, 2018, 5:03 AM EDT
Column 'alltables.kolicina' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.