I’m selecting 1 field from 1 table and storing it into a temp table.
Sometimes that table ends up with 0 rows.
I want to add that field onto another table that has 20+ fields
Regular union won’t work for me because of the field # mismatch. Outer wont work for me because there is nothing to compare. NVL doesn’t work on the first temp table.
Anyone know how to do it?
UPDATED:
I failed to mention…. When the table that retrieves 1 field finds a match in other cases, this code that I’m using now works….
SELECT DISTINCT reqhead_rec.resp_name<br> FROM reqhead_rec, biglist<br> WHERE reqhead_rec.req_no = biglist.req_no AND reqhead_rec.frm = biglist.req_frm<br> INTO TEMP grabname with no log; SELECT biglist.*, grabname.resp_name<br> FROM biglist, grabname<br> ORDER BY prnt_item, account_amt<br> INTO TEMP xxx with no log;
What field would it match with? BTW, here’s how to line them up:
UPDATE:
OK, after reading your update… I don’t think you want a UNION at all, but rather, and incredibly simple SUBSELECT