- To: Paul Haddon <phaddon@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [SLUG] [OT] Help needed with an SQL Join
- From: Tony Green <tgreen@xxxxxxxxxxxxxx>
- Date: Fri Jul 13 11:11:02 2001
- Cc: slug@xxxxxxxxxxx
- User-agent: Mutt/1.3.18i
* This one time, at band camp, Tony Green said:
> > select TIME_STAMP, USERNAME, ACCTSESSIONID, OCCTSIN, OCCTSOUT
> > from radius.accounting
> > where TIME_STAMP between XXXX and XXXX
> > UNION
> > select TIME_STAMP, USERNAME, ACCTSESSIONID, OCCTSIN, OCCTSOUT
> > from radius2.accounting
> > where TIME_STAMP between XXXX and XXXX
> > order by TIME_STAMP
This is the solution (needs tidying - but you get the idea)
CREATE TEMPORARY TABLE tmp type=HEAP SELECT * FROM ACCOUNTING;
INSERT INTO tmp SELECT * FROM radius2.ACCOUNTING;
SELECT * FROM tmp ORDER BY USERNAME;
DROP TABLE tmp;
--
Greeno <tgreen@xxxxxxxxxxxxxx>
GnuPG Key : 1024D/B5657C8B
Key fingerprint = 9ED8 59CC C161 B857 462E 51E6 7DFB 465B B565 7C8B
Imagine working in a secure environment and finding the string
_NSAKEY in the OS binaries without a good explanation
-Alan Cox 04/05/2001