johnirl has asked for the wisdom of the Perl Monks concerning the following question:
Result 1; R1something1 ; R1something2 ; R1something5 ; R1something6 ; R1something7 ; R1something8 ; Result2; R2something1 ; R2something2 ; R2something3 ; R2something4 ; R2something5 ; R2something6 ; R2something7 ; R2something8 ; R2something9 ; R2something 10;
But I want to display them beside each other to aid with comparisons. Like so:
Result 1 Result2 R1something1 ; R1something2 ; R2something1 ; R2something2 ; -- ; -- ; R2something3 ; R2something4 ; R1something5 ; R1something6 ; R2something5 ; R2something6 ; R1something7 ; R1something8 ; R2something7 ; R2something8 ; -- ; -- ; R2something9 ; R2something10;
I also need to know how I would substitute a null value with a "--" in my output file as I want the results that satisfy the same conditions beside each other and the results with no corresponding results in the other table should still be displayed i.e. R2Something 9 & 10 above.
I am retrieving results row by row. But I am unsure of how to switch between the statements. Will I have to retrieve all results for one sql statement and then begin the second? Or can I switch between the two? Or is there some funky perl module that can take care of this for me?
Any help you can give is appreciated
Thanks Monks
JohnIrl
Sum day soon I'Il lern how 2 spelI (r tYpe)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Merging SQL Results
by dws (Chancellor) on Aug 05, 2002 at 08:20 UTC | |
Re: Merging SQL Results
by physgreg (Scribe) on Aug 05, 2002 at 08:26 UTC | |
by johnirl (Monk) on Aug 05, 2002 at 08:40 UTC | |
by physgreg (Scribe) on Aug 05, 2002 at 09:49 UTC | |
Re: Merging SQL Results
by frankus (Priest) on Aug 05, 2002 at 09:59 UTC | |
by johnirl (Monk) on Aug 05, 2002 at 10:05 UTC | |
by Tomte (Priest) on Aug 05, 2002 at 11:26 UTC | |
Re: Merging SQL Results
by markjugg (Curate) on Aug 05, 2002 at 21:30 UTC |