After a bit of a struggle I've got the fields I want but I'm failing to use them in an update operation. This
SELECT i,o,n FROM ( SELECT alias_id i, (SELECT orig_itm FROM stmnts where ID = alias_id) o, (SELECT itm FROM std_itms where ID = std_id) n FROM (SELECT std_id, alias_id FROM alias_itms) ) works fine and gives me i, o, n where i, o, n equals id, old, new ============ 0, turnover, sales 1, cost of sales, cogs now I want to say update stmnts set itm = n where id = i but I'm getting errors Table fields stmnts______id, orig_itm, itm alias_itms____id, std_id, alias_id std_itms_____id, itm Any help much appreciated _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users