select * from member,payment where year!=2000 and member.id=payment.id; Thankfully, Trupti Rajesh Kini
Born in a GNU generation... >________________________________ > From: Abdur Rahman <sarsarah...@gmail.com> >To: ILUG-C <ilugc@ae.iitm.ac.in> >Sent: Friday, 21 June 2013 3:46 PM >Subject: [Ilugc] Need a clue in sql query writing > > >Hello all, I need help in writing the SQL Query i am struct at a point. >here goes my case. > > >I have two tables namely "member" and "payments" example structure of >member is >========================= >| Id | Name | >========================= >| 01 | Red | >| 02 | John | >| 03 | Patrick | >| 04 | Jane | > > >and the payment table is as follows >======================================== >| Id | Year | member_Id | >======================================== >| 01 | 1947 | 02 | >| 02 | 1958 | 03 | >| 03 | 2000 | 03 | >| 04 | 1988 | 04 | > >i want to fetch the records from the member table who are not made the >payment in the given year. for example if i enter 2000 > >it must return >========================= >| Id | Name | >========================= >| 01 | Red | >| 02 | John | >| 04 | Jane | > >can any one tell me how to query it. > >thanks in advance. >_______________________________________________ >ILUGC Mailing List: >http://www.ae.iitm.ac.in/mailman/listinfo/ilugc >ILUGC Mailing List Guidelines: >http://ilugc.in/mailinglist-guidelines > > > _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc ILUGC Mailing List Guidelines: http://ilugc.in/mailinglist-guidelines