SQL Ploblem

  EmBeZzLeR 14:19 30 May 03
Locked

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 Renter
INNER JOIN Branch
ON Renter.Bno=Branch.Bno

this 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?

  IanNiblock 14:35 30 May 03

SELECT * FROM Renter INNER JOIN Branch ON Renter.Bno = Branch.Bno

WHERE Branch.Bno = "B3"

  IanNiblock 14:38 30 May 03

I hope that works for you - however if the field 'Bno' is the Bno code that you reference then you should be able to use

SELECT * 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"

Regards

Ian

  EmBeZzLeR 14:39 30 May 03

That was really easy..... i was trying it without adding the .Bno... i feel silly now!!!

Thanks mate!

  IanNiblock 14:44 30 May 03

No problem - I have spent many hours on similar problems, we all do it!!

  EmBeZzLeR 14:44 30 May 03

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.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…