Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 9th, 2003, 10:14 AM
dcb dcb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 29 dcb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
access2k & duplicate records/value check

all-

heres the table definition

Scores
userid - foreign key; may dupe
course_id - foreign key- may dupe
comp_id - foreign key- may dupe
score - # value
date - mm/dd/yyyy - interested in last value
course_type- ='13'

scoreElements
course_id- foriegn key; may dupe
comp_id- may dupe
course_type ='13'

ok- tbl scores has all records for students per course per component. component may be taken multiple times- ie chapter 1 quiz. i need to return users who have a record in scores for all components defined in scoreelements for each course_id.

heres an example dataset-
scores:
userid, course_id,comp_id,score,date,course_type
usr1,crs1,quiz1,100,1/1/01,13
usr1,crs1,quiz2,100,1/2/01,13
usr1,crs1,quiz3,100,1/3/01,13
usr2,crs1,quiz1,100,1/1/01,13
usr2,crs1,quiz1,100,1/1/01,13
usr2,crs1,quiz1,100,1/1/01,13
usr1,crs2,quiz1,100,1/1/01,13
usr1,crs2,quiz2,100,1/1/01,13

scoreelements-
course_id,comp_id,course_type
crs1,quiz1,13
crs1,quiz2,13
crs1,quiz3,13
crs2,quiz1,13
crs1,quiz2,13
crs1,quiz3,13

desired query results
userid,course_id,score,date,pass
usr1,crs1,avg(score),last(date),[pass if score > 75]

usr1 has all com_id's for crs1, but not crs2. usr2 has not completed the course- quiz2 & 3 have not been completed. note: i think a coun(*) wont work becuase usr2 would have 3 records, but they are for quiz1

help pls!
duncan

Reply With Quote
  #2  
Old October 9th, 2003, 10:21 AM
dcb dcb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 29 dcb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sorry, last 2 records in score elements should read (crs# is crs2):
scoreelements-
course_id,comp_id,course_type
crs1,quiz1,13
crs1,quiz2,13
crs1,quiz3,13
crs2,quiz1,13
crs2,quiz2,13
crs2,quiz3,13

Reply With Quote
  #3  
Old October 9th, 2003, 05:31 PM
r937's Avatar
r937 r937 is offline
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 17,913 r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 12 h 24 m 34 sec
Reputation Power: 1018
hi again duncan

want me to sit down and shut up and let somebody else take a shot at this?

because i thought i had already solved this for you in that other thread

in fact, i still have my access database where i tested it


rudy

Reply With Quote
  #4  
Old October 10th, 2003, 07:55 AM
dcb dcb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 29 dcb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sorry- i thought it got buried- that query returned a couple wierd results- ill see if i got a syntax err in it

thanks,
duncan

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > access2k & duplicate records/value check


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT