in reply to Merging SQL Results

Since you aren't showing the queries, I can only speculate that what you're looking for is an "outer join" to do the merge. (Consult your RDBMS for details on doing an outer join. Details vary.) You'll end up with NULLs where there are no corresponding rows. You'll need to manually substitute "--" for NULL (undef).