Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Need Help For Sql ..join ..innerjoin

SQL

  • Please log in to reply
2 replies to this topic

#1 ramin

ramin

    CC Lurker

  • New Member
  • Pip
  • 9 posts

Posted 22 May 2012 - 12:47 PM

Hi
I am stuck on task.. i have tried many times but it goes wrong everytime
someone who can help me?

the sql question is :

select personnummer,namn,adress and postnummer from lärare who has had class
in the rum with id 3

lärare means teacher in swedish...

here is my relationmodell :
http://imageshack.us...4/47504925.jpg/


this is what i have writen

SELECT personnummer, namn, adress, postnr FROM Lärare JOIN Person ON Person.lärare= Lärare.adress, Lärare.personnummer, Lärare.postnr WHERE Person.id= 3
  • 0

#2 lespauled

lespauled

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1360 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash

Posted 23 May 2012 - 05:48 AM

Your query reformatted looks like this:
What were you trying to do with the parts in bold?

SELECT personnummer
, namn
, adress
, postnr
FROM Lärare
JOIN Person
ON Person.lärare= Lärare.adress, Lärare.personnummer, Lärare.postnr
WHERE Person.id= 3
  • 1
My Blog: http://forum.codecal...699-blog-77241/
"Women and Music: I'm always amazed by other people's choices." - David Lee Roth

#3 ramin

ramin

    CC Lurker

  • New Member
  • Pip
  • 9 posts

Posted 24 May 2012 - 02:42 PM

Your query reformatted looks like this:
What were you trying to do with the parts in bold?

SELECT personnummer
, namn
, adress
, postnr
FROM Lärare
JOIN Person
ON Person.lärare= Lärare.adress, Lärare.personnummer, Lärare.postnr
WHERE Person.id= 3


Thank you very much for your help.. like your profil picture .rainbow is great band
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download