SQL Ploblem

  EmBeZzLeR 14:19 30 May 2003
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 2003

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

WHERE Branch.Bno = "B3"

  IanNiblock 14:38 30 May 2003

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 2003

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

Thanks mate!

  IanNiblock 14:44 30 May 2003

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

  EmBeZzLeR 14:44 30 May 2003

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.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Microsoft Paint set to die after 32 years

Mac power user tips and hidden tricks

Comment désactiver la saisie intuitive et paramétrer votre clavier ?