Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Multiple Exists

Author  Topic 

MillianMan
Starting Member

5 Posts

Posted - 2012-01-12 : 09:10:11
I am trying to run the following query in Access 2010 but with no luck

UPDATE Application INNER JOIN Points ON Application.ApplicationID = Points.ApplicationID SET Points.Points = 4, Points.Answer = '4'
WHERE ((([Application].[StatusID])=1 Or ([Application].[StatusID])=2 Or ([Application].[StatusID])=3) AND (([Application].[TotalPoints])>6) AND ((Points.QuestionID)=46)
AND Exists
(
SELECT Points.ApplicationID
FROM Points
WHERE Points.QuestionID =1 And Points.Points >=1
)
AND Exists
(
SELECT Points.ApplicationID
FROM Points
WHERE Points.QuestionID =14 And Points.Points >=6
))

It doesnt't error but It doesnt work

For Example ApplicationID 4 has the following points:

Question 1: 1
Question 14: 0
However it still allocated 4 poitns to Question 46 (which is incorrect)

However, ApplicationID 12 has the following points:

Question 1: 0
Question 14: 6

However it still allocated 4 poitns to Question 46 (which is incorrect)

Does that nmake any sence to anyone?

Any pointers?

Cheers

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-12 : 13:21:57
existence needs to be correlated. You are confusing this with IN (

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -