Hello experts, I've got a small problem with an sql query here that's got me completely stuck.
In my MySQL database I've got two tables here that have identical design, e.g. table 'detail' - columns sales-order, quantity, part-number, price, date-sent and table 'archived' - columns sales-order, quantity, part-number, price, date-sent. Detail is for 'active' orders, and Archived is for fulfilled orders. Now some genius here wants to see all the records that reference a particular part number, irrespective of whether in archived or detail. My current approach is to create a temporary table with all the suitable records from detail, add in any suitable records from archived, and then do a select * query from this temporary table, before dropping it. Worst still, I'm going to have to do this all via PHP :-( Now it strikes me that this isn't a very smart way to do this, and it's probably achievable via joins but, try as I might, I can't get the system to do it. Anyone got any bright ideas/suggestions? Regards Bob Cross. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This message is confidential. It may also be privileged or protected by other legal rules. It does not constitute an offer or acceptance of an offer, nor shall it form any part of a legally binding contract. If you have received this communication in error, please let us know by reply then destroy it. You should not use, print, copy the message or disclose its contents to anyone. E-mail is subject to possible data corruption, is not secure, and its content does not necessarily represent the opinion of this Company. No representation or warranty is made as to the accuracy or completeness of the information and no liability can be accepted for any loss arising from its use. This e-mail and any attachments are not guaranteed to be free from so-called computer viruses and it is recommended that you check for such viruses before down-loading it to your computer equipment. This Company has no control over other websites to which there may be hypertext links and no liability can be accepted in relation to those sites. Scottish & Newcastle plc Registered in Scotland, Registered Number 16288 Registered Office: 33, Ellersly Road, Edinburgh, EH12 6HX * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php