Grid from 2 tables

in sql of grid,i want to select * from 2 tables, stock_avg & stock_fifo
why grid not running? error is attached.

SELECT *, ‘stock_fifo’ AS source_table FROM stock_fifo WHERE co_id = ‘62’ AND journal_type = ‘pur_trans’ AND logged_in_fin_yr = ‘2026-2027’ AND trans_no = 519 UNION ALL SELECT *, ‘stock_avg’ AS source_table FROM stock_avg WHERE co_id = ‘62’ AND journal_type = ‘pur_trans’ AND logged_in_fin_yr = ‘2026-2027’ AND trans_no = 519;

When doing an UNION, be sure the 2 tables have exactly the same number of field, if not, list the field don’t use *

Also test your SQL with DBeaver, HeidiSQL or what other tools you use to manage your database.When your SQL work outside of Scriptcase then include it in your grid