Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Another Solution For Sql Task

SQL

  • Please log in to reply
No replies to this topic

#1 ramin

ramin

    CC Lurker

  • New Member
  • Pip
  • 9 posts

Posted 24 May 2012 - 03:23 PM

hello
I have a problem with this task
it is absolutely right, but since MS Acces 2003 is not supported for the DISTINCT after COUNT
our teacher want us to do the task in a Other Way
does anyone have any suggestions?

This is the relationship model
http://imageshack.us...4/47504925.jpg/

and here is the right code which only do not work in ms acces:

SELECT p.personnummer, p.namn, p.ort FROM Person p INNER JOIN Lärare l ON l.personnummer = p.personnummer WHERE p.personnummer IN ( SELECT personnummer

FROM Kurstillfälle, Lärare

WHERE lärare=personnummer

GROUP BY personnummer

HAVING Count (rum) > 2 );


and the question was : Select the nummer, namn and ort from lärare who have kept (coursesessions =Kurstillfälle) for at least three
VARIOUS rum
  • 0





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