aswini_1978 Posted December 7, 2006 Share Posted December 7, 2006 Can anyone help me out !!!!I am currently using this query which is working fineSELECT pid, name_last FROM TabA where pid Not In(select pid from TabB where encounter_class_nr=1 and is_discharged=0 ) order by date_reg descBut its not working in MySQL 4.1 as subquery is not supportedSo I want to solve this by join query...Anyone can replyThanx a ton in advance Quote Link to comment Share on other sites More sharing options...
artacus Posted December 7, 2006 Share Posted December 7, 2006 [code]SELECT pid, name_lastFROM TabALEFT JOIN TabB ON TabA.pid = TabB.pid AND TabB.encounter_class_nr=1 AND TabB.is_discharged = 0WHERE TabB.pid IS NULL[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.