Is this cheating? 1* select a.c1||' '||a.c2||CHR(10)||b.c1||' '||b.c2 RESULTS from crap a, crap b where a.c2 = b.c1 and b.c2 = a.c1 SQL> /
RESULTS ----------- DAL AUS AUS DAL HOU AUS AUS HOU AUS DAL DAL AUS HOU DAL DAL HOU LIT DAL DAL LIT XYZ DAL DAL XYZ AUS HOU HOU AUS DAL HOU HOU DAL LIT HOU HOU LIT XYZ HOU HOU XYZ DAL LIT LIT DAL HOU LIT LIT HOU DAL XYZ XYZ DAL HOU XYZ XYZ HOU 14 rows selected. > -----Original Message----- > From: Deshpande, Kirti [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 13, 2003 2:24 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Corrected SQL Question... > > > All they wanted was to "pair up" those city codes. > DAL -- AUS followed by AUS -- DAL, > AUS -- HOU followed by HOU -- AUS > etc... > and on separate lines. > So, cross-tab did not have the right format. > > I sent them Jacques Kilchoer's solution (he also sent me a > simplified one, without the UNION), and it was acceptable. > Problem solved, as there are no more questions :) > > - Kirti > > -----Original Message----- > Sent: Thursday, March 13, 2003 1:46 PM > To: Multiple recipients of list ORACLE-L > > > > Questions I would have for those who wrote the requirements: > Of possible combinations of the form ABC XYZ XYZ ABC, which > do they want? > > As can be seen from the answers sent to the list, there is > more than one set > of responses that give this pattern. If they only want "half" of the > possible patterns, which half is the correct half? > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: Deshpande, Kirti > INET: [EMAIL PROTECTED] > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Stephen Lee INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).