I'm trying to get all renter details for those renters who are registered at Glasgow branch using an innter join....i know you need to see the table but i'll show you what ive done so far....SELECT *FROM RenterINNER JOIN BranchON Renter.Bno=Branch.Bnothis shows all the renters but i need to somehow only show the ones who are registered at the Glasgow branch and the Bno code of that branch is B3... Can anyone help?
SELECT * FROM Renter INNER JOIN Branch ON Renter.Bno = Branch.BnoWHERE Branch.Bno = "B3"
I hope that works for you - however if the field 'Bno' is the Bno code that you reference then you should be able to useSELECT * FROM Renter WHERE Renter.Bno = "B3"If the Bno field is not the Bno code that you talk about then you should replace the WHERE Branch.Bno = "B3" with WHERE Branch.Bnocode = "B3"RegardsIan
That was really easy..... i was trying it without adding the .Bno... i feel silly now!!!Thanks mate!
No problem - I have spent many hours on similar problems, we all do it!!
I had to use an Inner Join because it was a test question and i would get extra marks
This thread is now locked and can not be replied to.
Surface Pro (2017) vs Surface Pro 4
Where HTML5 is headed next
MacBook Pro v Surface Pro 5
Synology invites you to visit them at Insomnia on 26th – 29th August. Book your tickets now and visit Synology.
© Copyright 2017 IDG UK. All Rights Reserved.